]> andersk Git - openssh.git/commitdiff
- (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Bug #1299: Use the
authordtucker <dtucker>
Sun, 29 Apr 2007 03:58:06 +0000 (03:58 +0000)
committerdtucker <dtucker>
Sun, 29 Apr 2007 03:58:06 +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 d8ea62aa515189e0204c7187f6cb7e05ec3c8bc4..1f5f1075b8757744cd4a78e9e190ec066e78714e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
  - (dtucker) [openbsd-compat/bsd-misc.c] Include unistd.h and sys/types.h
    for select(2) prototype.
  - (dtucker) [auth-shadow.c loginrec.c] Include time.h for time(2) prototype.
+ - (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.
 
 20070406
  - (dtucker) [INSTALL] Update the systems that have PAM as standard.  Link
index 157cb6ff5c91eab8fc4eea9d908fb27d113d77ff..31ff6e61ad6908a36e342d5bbdd8950fc320743d 100644 (file)
@@ -3154,6 +3154,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.059213 seconds and 5 git commands to generate.