Ensure NULL is defined, before using it.
authorBruno Haible <bruno@clisp.org>
Mon, 15 Oct 2007 11:12:04 +0000 (13:12 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 15 Oct 2007 11:12:04 +0000 (13:12 +0200)
ChangeLog
m4/getaddrinfo.m4

index 47cbb39..e842706 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-15  Bruno Haible  <bruno@clisp.org>
+
+       * m4/getaddrinfo.m4 (gl_GETADDRINFO, gl_PREREQ_GETADDRINFO): Include
+       <stdlib.h> before using NULL.
+
 2007-10-15  Simon Josefsson  <simon@josefsson.org>
 
        * m4/getaddrinfo.m4: Use NULL rather than 0 for pointers.
index df60779..0234c70 100644 (file)
@@ -35,6 +35,7 @@ AC_DEFUN([gl_GETADDRINFO],
 #ifdef HAVE_WS2TCPIP_H
 #include <ws2tcpip.h>
 #endif
+#include <stdlib.h>
 ], [getaddrinfo(NULL, NULL, NULL, NULL);], gl_cv_w32_getaddrinfo=yes)
     LIBS="$am_save_LIBS"])
     if test "$gl_cv_w32_getaddrinfo" = "yes"; then
@@ -60,6 +61,7 @@ AC_DEFUN([gl_GETADDRINFO],
 #ifdef HAVE_WS2TCPIP_H
 #include <ws2tcpip.h>
 #endif
+#include <stdlib.h>
 ], [gai_strerror (NULL);],
         [gl_cv_func_gai_strerror=yes],
         [gl_cv_func_gai_strerror=no])])
@@ -85,6 +87,7 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
 #endif
+#include <stdlib.h>
 ], [gethostbyname(NULL);], gl_cv_w32_gethostbyname=yes)
     LIBS="$am_save_LIBS"])
     if test "$gl_cv_w32_gethostbyname" = "yes"; then