From ae75db3527461248b0a7b1686df52200d28d83b9 Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Fri, 29 Dec 2023 05:43:33 +0000 Subject: [PATCH] configure: fix no default int compile error in ipv6 detection Closes #12607 --- configure.ac | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 3e89da9f32..79c98b3c4e 100644 --- a/configure.ac +++ b/configure.ac @@ -1655,15 +1655,12 @@ AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), # include #endif #endif -#include /* 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; } ]]) ], -- 2.47.3