aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-06 14:18:20 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-06 14:18:20 +0000
commitf6617ad296d50b7f0a8cbb7ce7106807d2ae4b0b (patch)
tree05f46fab963727e0a8d8a50b30994665758f132d /configure.ac
parent73b390aa8f6d2f07d8ef6ef8582fa6e3a798637b (diff)
(closes issue #10383)
Reported by: rizzo Include stdlib.h so NULL gets defined for gethostbyname_r checks. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78166 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index bba577563..f44eabcdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -266,7 +266,8 @@ AC_SEARCH_LIBS(gethostbyname_r, [socket nsl])
AC_MSG_CHECKING(for gethostbyname_r with 6 arguments)
AC_LINK_IFELSE(
- AC_LANG_PROGRAM([#include <netdb.h>],
+ AC_LANG_PROGRAM([#include <stdlib.h>
+ #include <netdb.h>],
[struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (struct hostent **)NULL, (int *)NULL);]),
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_GETHOSTBYNAME_R_6], 1, [Define to 1 if your system has gethostbyname_r with 6 arguments.]),
@@ -275,7 +276,8 @@ AC_LINK_IFELSE(
AC_MSG_CHECKING(for gethostbyname_r with 5 arguments)
AC_LINK_IFELSE(
- AC_LANG_PROGRAM([#include <netdb.h>],
+ AC_LANG_PROGRAM([#include <stdlib.h>
+ #include <netdb.h>],
[struct hostent *he = gethostbyname_r((const char *)NULL, (struct hostent *)NULL, (char *)NULL, (int)0, (int *)NULL);]),
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_GETHOSTBYNAME_R_5], 1, [Define to 1 if your system has gethostbyname_r with 5 arguments.]),