aboutsummaryrefslogtreecommitdiffstats
path: root/lib/config-win32.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/config-win32.h')
-rw-r--r--lib/config-win32.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/config-win32.h b/lib/config-win32.h
index 76ee6b1a..316043d8 100644
--- a/lib/config-win32.h
+++ b/lib/config-win32.h
@@ -718,18 +718,22 @@ Vista
#define USE_WIN32_CRYPTO
#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 USE_UNIX_SOCKETS
#if !defined(UNIX_PATH_MAX)
/* Replicating logic present in afunix.h of newer Windows 10 SDK versions */
# define UNIX_PATH_MAX 108
-# include <ws2tcpip.h>
/* !checksrc! disable TYPEDEFSTRUCT 1 */
typedef struct sockaddr_un {
ADDRESS_FAMILY sun_family;
char sun_path[UNIX_PATH_MAX];
} SOCKADDR_UN, *PSOCKADDR_UN;
#endif
+#endif
/* ---------------------------------------------------------------- */
/* ADDITIONAL DEFINITIONS */