]> andersk Git - openssh.git/commitdiff
- (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Bug #1299: Use the
authordtucker <dtucker>
Sun, 29 Apr 2007 03:58:47 +0000 (03:58 +0000)
committerdtucker <dtucker>
Sun, 29 Apr 2007 03:58:47 +0000 (03:58 +0000)
   platform's _res if it has one.  Should fix problem of DNSSEC record lookups
   on NetBSD as reported by Curt Sampson.

ChangeLog
configure.ac
openbsd-compat/getrrsetbyname.c

index ac7b9ce19fb11a6ea0f0e192ec12a3190c001c27..f986ab6f28ecf93761edc808013d67d242663989 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+20070429
+ - (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Bug #1299: Use the
+   platform's _res if it has one.  Should fix problem of DNSSEC record lookups
+   on NetBSD as reported by Curt Sampson.
+
 20070326
  - (tim) [auth.c configure.ac defines.h session.c openbsd-compat/port-uw.c
    openbsd-compat/port-uw.h openbsd-compat/xcrypt.c] Rework libiaf test/defines
index 28c3f43d297686fa65ce8bece04cb9844032022b..1b750f6350e5907432502faeb5d64f1d9404f66c 100644 (file)
@@ -3155,6 +3155,25 @@ int main()
                        [#include <arpa/nameser.h>])
        ])
 
+AC_MSG_CHECKING(if struct __res_state _res is an extern)
+AC_LINK_IFELSE([
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+extern struct __res_state _res;
+int main() { return 0; }
+               ],
+               [AC_MSG_RESULT(yes)
+                AC_DEFINE(HAVE__RES_EXTERN, 1,
+                   [Define if you have struct __res_state _res as an extern])
+               ],
+               [ AC_MSG_RESULT(no) ]
+)
+
 # Check whether user wants SELinux support
 SELINUX_MSG="no"
 LIBSELINUX=""
index 07231d005f77394979fba9a2a44495bafc2ac76b..80af3f5425287724d3439fc12242a1e6fd613862 100644 (file)
@@ -67,13 +67,9 @@ extern int h_errno;
 #endif
 #define _THREAD_PRIVATE(a,b,c) (c)
 
-/* to avoid conflicts where a platform already has _res */
-#ifdef _res
-# undef _res
-#endif
-#define _res   _compat_res
-
+#ifndef HAVE__RES_EXTERN
 struct __res_state _res;
+#endif
 
 /* Necessary functions and macros */
 
This page took 0.18353 seconds and 5 git commands to generate.