From 3e3aedb3c927abdd255233a9424eb53bf307cf13 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 6 Aug 2007 14:18:20 +0000 Subject: [PATCH] (closes issue #10383) Reported by: rizzo Include stdlib.h so NULL gets defined for gethostbyname_r checks. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78166 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- configure | 8 +++++--- configure.ac | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/configure b/configure index c80b9ab281..411de1be99 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 77863 . +# From configure.ac Revision: 77865 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # @@ -14735,7 +14735,8 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include + #include int main () { @@ -14789,7 +14790,8 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include + #include int main () { diff --git a/configure.ac b/configure.ac index bba577563a..f44eabcdc1 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 ], + AC_LANG_PROGRAM([#include + #include ], [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 ], + AC_LANG_PROGRAM([#include + #include ], [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.]),