summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2007-04-29 13:58:47 +1000
committerDarren Tucker <dtucker@zip.com.au>2007-04-29 13:58:47 +1000
commitb7bbc8b9bd06b356e55a71eb1d8fa51fa5ae1d6c (patch)
tree9ca6be86cea5e582721c5f4d694e26fc0d072fd3
parent02cd252e4a4e7e46269d815a245caf1205846d70 (diff)
- (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.
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac23
-rw-r--r--openbsd-compat/getrrsetbyname.c8
3 files changed, 29 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index d633292d..0b8d3952 100644
--- 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
@@ -2837,4 +2842,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
-$Id: ChangeLog,v 1.4635.2.5 2007/03/27 09:07:48 dtucker Exp $
+$Id: ChangeLog,v 1.4635.2.6 2007/04/29 03:58:47 dtucker Exp $
diff --git a/configure.ac b/configure.ac
index 83a0a786..2f48e24a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.372.2.1 2007/03/27 09:07:48 dtucker Exp $
+# $Id: configure.ac,v 1.372.2.2 2007/04/29 03:58:47 dtucker Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@@ -15,7 +15,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
-AC_REVISION($Revision: 1.372.2.1 $)
+AC_REVISION($Revision: 1.372.2.2 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_CONFIG_HEADER(config.h)
@@ -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=""
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 */