From 1270a9d8ee0ea6ae533546b07a6714f351346600 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 20 Feb 2009 10:17:43 +0000 Subject: 26584: use bind/netdb.h where appropriate --- ChangeLog | 7 ++++++- Src/Modules/tcp.h | 9 +++++++++ configure.ac | 6 ++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index acace9630..10062d56c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-20 Peter Stephenson + + * 26584: configure.ac, Src/Modules/tcp.h: use bind/netdb.h where + appropriate. + 2009-02-19 Peter Stephenson * 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 #include + +#ifdef HAVE_BIND_NETDB_H +/* + * On systems where we're using -lbind, this has more definitions + * than the standard header. + */ +#include +#else #include +#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 --------------- -- cgit 1.4.1