Browse code

Fix compilation on MinGW with -std=c99

commit 9223336a88bc moved the CFLAGS="-std=c99" bit in configure.ac
before the "socklen_t" test, which relies on #ifdef WIN32 to decide
whether to include <ws2tcpip.h> or <sys/socket.h> - which is no longer
defined then, and things explode in interesting ways.

Change to _WIN32, which is the "always defined on all compilers" define
for this.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20161113193645.73523-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13032.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Gert Doering authored on 2016/11/14 04:36:45
Showing 1 changed files
... ...
@@ -55,7 +55,7 @@ getpeername(0,0,&len);
55 55
 		],
56 56
 		[[
57 57
 #include <sys/types.h>
58
-#ifdef WIN32
58
+#ifdef _WIN32
59 59
 #include <ws2tcpip.h>
60 60
 #else
61 61
 #include <sys/socket.h>