summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2015-02-21 15:10:33 +1100
committerDarren Tucker <dtucker@zip.com.au>2015-02-21 15:10:33 +1100
commite50e8c97a9cecae1f28febccaa6ca5ab3bc10f54 (patch)
treeef2e49e129797e656bb38807a9a03a40bef981d8
parent18a208d6a460d707a45916db63a571e805f5db46 (diff)
Add null declaration of AI_NUMERICINFO.
Some platforms (older FreeBSD and DragonFly versions) do have getaddrinfo() but do not have AI_NUMERICINFO. so define it to zero in those cases.
-rw-r--r--configure.ac7
-rw-r--r--defines.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index cb66f54b1..2ef9db6d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2197,6 +2197,13 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
2197 ) 2197 )
2198fi 2198fi
2199 2199
2200if test "x$ac_cv_func_getaddrinfo" = "xyes"; then
2201 AC_CHECK_DECLS(AI_NUMERICSERV, , ,
2202 [#include <sys/types.h>
2203 #include <sys/socket.h>
2204 #include <netdb.h>])
2205fi
2206
2200if test "x$check_for_conflicting_getspnam" = "x1"; then 2207if test "x$check_for_conflicting_getspnam" = "x1"; then
2201 AC_MSG_CHECKING([for conflicting getspnam in shadow.h]) 2208 AC_MSG_CHECKING([for conflicting getspnam in shadow.h])
2202 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <shadow.h> ]], 2209 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <shadow.h> ]],
diff --git a/defines.h b/defines.h
index f489196ed..1ec9467dc 100644
--- a/defines.h
+++ b/defines.h
@@ -594,6 +594,10 @@ struct winsize {
594# undef HAVE_GAI_STRERROR 594# undef HAVE_GAI_STRERROR
595#endif 595#endif
596 596
597#if defined(HAVE_GETADDRINFO) && !defined(HAVE_DECL_AI_NUMERICSERV)
598# define AI_NUMERICSERV 0
599#endif
600
597#if defined(BROKEN_UPDWTMPX) && defined(HAVE_UPDWTMPX) 601#if defined(BROKEN_UPDWTMPX) && defined(HAVE_UPDWTMPX)
598# undef HAVE_UPDWTMPX 602# undef HAVE_UPDWTMPX
599#endif 603#endif