From 1dd86292270bc536a6d87f40c388b8b55def1623 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 2 Feb 2019 07:42:53 +0000 Subject: [PATCH] Define socket constants on MinGW if missing --- src/network/core/os_abstraction.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/network/core/os_abstraction.h b/src/network/core/os_abstraction.h index 32c6cffff2..5307e7321b 100644 --- a/src/network/core/os_abstraction.h +++ b/src/network/core/os_abstraction.h @@ -39,6 +39,19 @@ typedef unsigned long in_addr_t; typedef int socklen_t; # define IPPROTO_IPV6 41 #endif /* !(__MINGW32__ && __CYGWIN__) */ + +#if defined(__MINGW32__) +#ifndef AI_ADDRCONFIG +#define AI_ADDRCONFIG 0x400 +#endif +#ifndef IPPROTO_IPV6 +#define IPPROTO_IPV6 41 +#endif +#ifndef IPV6_V6ONLY +#define IPV6_V6ONLY 27 +#endif +#endif /* __MINGW32__ */ + #endif /* _WIN32 */ /* UNIX stuff */