summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/getrrsetbyname.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2006-05-15 09:15:56 +0200
committerDarren Tucker <dtucker@zip.com.au>2006-05-15 09:15:56 +0200
commit13c539a4dcfa7a7fb34bbd43478aa913e27b8ba6 (patch)
treee780ff2f1be36a485f2f4879fea0d2ca70b589c3 /openbsd-compat/getrrsetbyname.c
parent - dtucker@cvs.openbsd.org 2006/05/06 08:35:40 (diff)
downloadopenssh-13c539a4dcfa7a7fb34bbd43478aa913e27b8ba6.tar.xz
openssh-13c539a4dcfa7a7fb34bbd43478aa913e27b8ba6.zip
- (dtucker) [openbsd-compat/getrrsetbyname.c] Use _compat_res instead of
_res, prevents problems on some platforms that have _res as a global but don't have getrrsetbyname(), eg IRIX 5.3. Found and tested by georg.schwarz at freenet.de, ok djm@.
Diffstat (limited to '')
-rw-r--r--openbsd-compat/getrrsetbyname.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c
index bea6aea3b..8dc744703 100644
--- a/openbsd-compat/getrrsetbyname.c
+++ b/openbsd-compat/getrrsetbyname.c
@@ -60,6 +60,10 @@ extern int h_errno;
# undef _THREAD_PRIVATE
#endif
#define _THREAD_PRIVATE(a,b,c) (c)
+
+/* to avoid conflicts where a platform already has _res */
+#define _res _compat_res
+
struct __res_state _res;
/* Necessary functions and macros */