configure: Fix test with -Werror=implicit-function-declaration
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Nov 2013 02:58:25 +0000 (18:58 -0800)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Nov 2013 03:00:22 +0000 (19:00 -0800)
The ipv6 auto-detect test in configure returns a false negative when
CFLAGS contains -Werror=implicit-function-declaration. (I have been
using this flag to detect code issues that would result in SEGVs on
x86_64-cygwin.)

Patch-by: Yaakov Selkowitz
Bug: http://curl.haxx.se/bug/view.cgi?id=1304

configure.ac

index 2b9e7e4..1347cbd 100644 (file)
@@ -1065,6 +1065,7 @@ AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]),
   AC_TRY_RUN([ /* is AF_INET6 available? */
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <stdlib.h> /* for exit() */
 main()
 {
  if (socket(AF_INET6, SOCK_STREAM, 0) < 0)