]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: fix no default int compile error in ipv6 detection
authorannalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>
Fri, 29 Dec 2023 05:43:33 +0000 (05:43 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 29 Dec 2023 09:47:40 +0000 (10:47 +0100)
Closes #12607

configure.ac

index 3e89da9f328ef9d39d162fcd6735be695186c881..79c98b3c4e9c2e143b5ce44c991c4327055f312c 100644 (file)
@@ -1655,15 +1655,12 @@ AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
 # include <netinet/in6.h>
 #endif
 #endif
-#include <stdlib.h> /* for exit() */
-main()
+
+int main(void)
 {
  struct sockaddr_in6 s;
  (void)s;
- if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
-   exit(1);
- else
-   exit(0);
+ return socket(AF_INET6, SOCK_STREAM, 0) < 0;
 }
 ]])
 ],