mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 09:21:50 -05:00
windows: disable Unix Sockets for old mingw
Classic mingw and 10y+ old versions of mingw-w64 don't ship with
Windows headers having the typedef necessary for Unix Sockets
support, so try detecting these environments to disable this
feature.
Ref: cf6afc5717
/
Reviewed-by: Daniel Stenberg
Fixes #5674
Closes #5758
This commit is contained in:
parent
07fd3fa07f
commit
8297978c21
@ -718,18 +718,22 @@ Vista
|
|||||||
#define USE_WIN32_CRYPTO
|
#define USE_WIN32_CRYPTO
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* On MinGW the ADDRESS_FAMILY typedef was committed alongside LUP_SECURE,
|
||||||
|
so we use it to check for the presence of the typedef. */
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#if !defined(__MINGW32__) || defined(LUP_SECURE)
|
||||||
/* Define to use Unix sockets. */
|
/* Define to use Unix sockets. */
|
||||||
#define USE_UNIX_SOCKETS
|
#define USE_UNIX_SOCKETS
|
||||||
#if !defined(UNIX_PATH_MAX)
|
#if !defined(UNIX_PATH_MAX)
|
||||||
/* Replicating logic present in afunix.h of newer Windows 10 SDK versions */
|
/* Replicating logic present in afunix.h of newer Windows 10 SDK versions */
|
||||||
# define UNIX_PATH_MAX 108
|
# define UNIX_PATH_MAX 108
|
||||||
# include <ws2tcpip.h>
|
|
||||||
/* !checksrc! disable TYPEDEFSTRUCT 1 */
|
/* !checksrc! disable TYPEDEFSTRUCT 1 */
|
||||||
typedef struct sockaddr_un {
|
typedef struct sockaddr_un {
|
||||||
ADDRESS_FAMILY sun_family;
|
ADDRESS_FAMILY sun_family;
|
||||||
char sun_path[UNIX_PATH_MAX];
|
char sun_path[UNIX_PATH_MAX];
|
||||||
} SOCKADDR_UN, *PSOCKADDR_UN;
|
} SOCKADDR_UN, *PSOCKADDR_UN;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
/* ADDITIONAL DEFINITIONS */
|
/* ADDITIONAL DEFINITIONS */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user