aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 1a91c3dd1..9c67c919d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1500,8 +1500,6 @@ TYPE_SOCKADDR_STORAGE
AC_FUNC_SELECT_ARGTYPES
-CURL_FUNC_GETNAMEINFO_ARGTYPES
-
dnl Checks for library functions.
dnl AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
@@ -1524,6 +1522,7 @@ AC_CHECK_FUNCS( strtoll \
stricmp \
strcmpi \
gethostbyaddr \
+ getnameinfo \
gettimeofday \
inet_addr \
inet_ntoa \
@@ -1615,6 +1614,21 @@ AC_CHECK_DECL(inet_pton, ,
]
)
+if test "$ac_cv_func_getnameinfo" = "yes"; then
+ AC_CHECK_DECL(getnameinfo, ,
+ AC_DEFINE(HAVE_NO_GETNAMEINFO_PROTO, 1,
+ [Defined if no getnameinfo() prototype available]),
+ [
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+ ])
+ CURL_FUNC_GETNAMEINFO_ARGTYPES
+fi
+
AC_MSG_CHECKING([if we are Mac OS X (to disable poll)])
disable_poll=no
case $host in