r25587: Fix getaddrinfo detection code. From Timur.
authorJeremy Allison <jra@samba.org>
Mon, 8 Oct 2007 23:11:33 +0000 (23:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:31:16 +0000 (12:31 -0500)
Jeremy.

source/lib/replace/libreplace.m4

index 9063f5029d7afb84ff1efcc1420d09a049558ddf..4bdbf3a5046515bcaac2a2a0ed82b23c1b104e41 100644 (file)
@@ -141,6 +141,10 @@ dnl test for struct addrinfo
 AC_CACHE_CHECK([for struct addrinfo],samba_cv_HAVE_STRUCT_ADDRINFO,[
 AC_TRY_COMPILE([
 #include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
 #include <sys/socket.h>
 #include <netdb.h>],
 [
@@ -154,8 +158,12 @@ fi
 dnl test for getaddrinfo/getnameinfo
 AC_CACHE_CHECK([for getaddrinfo],samba_cv_HAVE_GETADDRINFO,[
 AC_TRY_COMPILE([
-#include <sys/socket.h>
 #include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#include <sys/socket.h>
 #include <netdb.h>],
 [
 struct sockaddr sa;