configure: fix no default int compile error in ipv6 detection

Closes #12607
This commit is contained in:
annalee 2023-12-29 05:43:33 +00:00 committed by Daniel Stenberg
parent 0af61bffb1
commit ae75db3527
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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;
}
]])
],