From: dtucker Date: Sun, 29 Apr 2007 03:58:06 +0000 (+0000) Subject: - (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Bug #1299: Use the X-Git-Tag: V_4_7_P1~87 X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/commitdiff_plain/560acf8052a34f5e26c618068f6808602a96614f - (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. --- diff --git a/ChangeLog b/ChangeLog index d8ea62aa..1f5f1075 100644 --- 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 diff --git a/configure.ac b/configure.ac index 157cb6ff..31ff6e61 100644 --- a/configure.ac +++ b/configure.ac @@ -3154,6 +3154,25 @@ int main() [#include ]) ]) +AC_MSG_CHECKING(if struct __res_state _res is an extern) +AC_LINK_IFELSE([ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#include +#include +#include +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="" diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c index 07231d00..80af3f54 100644 --- a/openbsd-compat/getrrsetbyname.c +++ b/openbsd-compat/getrrsetbyname.c @@ -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 */