summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/Modules/tcp.h9
-rw-r--r--configure.ac6
3 files changed, 21 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index acace9630..10062d56c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-20 Peter Stephenson <pws@csr.com>
+
+ * 26584: configure.ac, Src/Modules/tcp.h: use bind/netdb.h where
+ appropriate.
+
2009-02-19 Peter Stephenson <pws@csr.com>
* 26583: Src/init.c, Src/zsh.h: use HOOK_SUFFIX more widely
@@ -11210,5 +11215,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4573 $
+* $Revision: 1.4574 $
*****************************************************
diff --git a/Src/Modules/tcp.h b/Src/Modules/tcp.h
index 231267e22..f69e246e0 100644
--- a/Src/Modules/tcp.h
+++ b/Src/Modules/tcp.h
@@ -37,7 +37,16 @@
#include <sys/types.h>
#include <sys/socket.h>
+
+#ifdef HAVE_BIND_NETDB_H
+/*
+ * On systems where we're using -lbind, this has more definitions
+ * than the standard header.
+ */
+#include <bind/netdb.h>
+#else
#include <netdb.h>
+#endif
/*
* For some reason, configure doesn't always detect netinet/in_systm.h.
diff --git a/configure.ac b/configure.ac
index 50658e573..d67f2034c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -755,6 +755,12 @@ fi
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(bind, gethostbyname2)
+case $LIBS in
+ *-lbind*)
+ AC_CHECK_HEADERS(bind/netdb.h)
+ ;;
+esac
+
dnl ---------------
dnl CHECK FOR ICONV
dnl ---------------