From: Zen Dodd Date: Sat, 6 Jun 2026 03:14:12 +0000 (+1000) Subject: configure: avoid runtime IPv6 availability probe X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7639ce460752e1f67270489228654988d435d015;p=thirdparty%2Frsync.git configure: avoid runtime IPv6 availability probe --- diff --git a/configure.ac b/configure.ac index cfccb37c..cda60405 100644 --- a/configure.ac +++ b/configure.ac @@ -432,21 +432,17 @@ AS_HELP_STRING([--disable-ipv6],[disable to omit ipv6 support]), ;; esac ], - AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 availability check */ -#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include -int main() -{ - if (socket(AF_INET6, SOCK_STREAM, 0) < 0) - exit(1); - else - exit(0); -} +#include +]], [[ +struct sockaddr_in6 sa6; +(void)sa6; +(void)AF_INET6; ]])], [AC_MSG_RESULT(yes) - AC_DEFINE(INET6, 1, true if you have IPv6)], - [AC_MSG_RESULT(no)], + AC_DEFINE(INET6, 1, [true if you have IPv6])], [AC_MSG_RESULT(no)] ))