From: Viktor Szakats Date: Tue, 11 Oct 2022 07:51:33 +0000 (+0000) Subject: autotools: allow unix sockets on Windows X-Git-Tag: curl-7_86_0~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23029838e277f6177b6ab99e9a78fa8dccddb1e4;p=thirdparty%2Fcurl.git autotools: allow unix sockets on Windows Fixes: https://github.com/curl/curl-for-win/blob/73a070d96fd906fdee929e2f1f00a9149fb39239/curl-autotools.sh#L44-L47 On Windows this feature is present, but not the header used in the detection logic. It also requires an elaborate enabler logic (as seen in `lib/curl_setup.h`). Let's always allow it and let the lib code deal with the details. Closes #9688 --- diff --git a/configure.ac b/configure.ac index b72666fb8b..445b3f9047 100644 --- a/configure.ac +++ b/configure.ac @@ -3905,17 +3905,23 @@ AS_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]), ] ) if test "x$want_unix_sockets" != "xno"; then - AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [ + if test "x$curl_cv_native_windows" = "xyes"; then + USE_UNIX_SOCKETS=1 AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets]) - AC_SUBST(USE_UNIX_SOCKETS, [1]) curl_unix_sockets_msg="enabled" - ], [ - if test "x$want_unix_sockets" = "xyes"; then - AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!]) - fi - ], [ - #include - ]) + else + AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [ + AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets]) + AC_SUBST(USE_UNIX_SOCKETS, [1]) + curl_unix_sockets_msg="enabled" + ], [ + if test "x$want_unix_sockets" = "xyes"; then + AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!]) + fi + ], [ + #include + ]) + fi fi dnl ************************************************************