Skip to content

Commit

Permalink
autotools: allow unix sockets on Windows
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vszakats committed Oct 11, 2022
1 parent 3b48374 commit 2302983
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sys/un.h>
])
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 <sys/un.h>
])
fi
fi

dnl ************************************************************
Expand Down

0 comments on commit 2302983

Please sign in to comment.