cmake: fix support for UnixSockets feature on Win32

Move the definition of sockaddr_un struct from config-win32.h to
curl_setup.h, so that it could be shared by all build systems.

Add ADDRESS_FAMILY typedef for old mingw, now old mingw can also use
unix sockets.

Also fix the build of tests/server/sws.c on Win32 when USE_UNIX_SOCKETS
is defined.

Closes #7034
This commit is contained in:
Li Xinwei 2021-06-04 15:03:30 +08:00 committed by Daniel Stenberg
parent 62be096085
commit 30e491e5c9
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 30 additions and 26 deletions

View file

@ -50,12 +50,6 @@
# define in_addr_t unsigned long
#endif
#if defined(USE_UNIX_SOCKETS) && defined(WINAPI_FAMILY) && \
(WINAPI_FAMILY == WINAPI_FAMILY_APP)
/* Required for sockaddr_un type */
# include <afunix.h>
#endif
#include <stddef.h>
#include "curl_addrinfo.h"