]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix compilation on MinGW with -std=c99
authorGert Doering <gert@greenie.muc.de>
Sun, 13 Nov 2016 19:36:45 +0000 (20:36 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 13 Nov 2016 19:42:34 +0000 (20:42 +0100)
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>
m4/ax_socklen_t.m4

index cd7cad8acf83b3c72a8bb78eb49799f978e4ab1d..b420a170ed5490e34b5c4f681e99e9faa4f1419f 100644 (file)
@@ -55,7 +55,7 @@ getpeername(0,0,&len);
                ],
                [[
 #include <sys/types.h>
-#ifdef WIN32
+#ifdef _WIN32
 #include <ws2tcpip.h>
 #else
 #include <sys/socket.h>