From aab2f95439c28e2aa9358dbfe1ce7a15c774a766 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Fri, 4 Mar 2011 23:14:33 +0200 Subject: Windows cross-compile cleanup It should be sufficient to just try to see if socklen_t is defined. Next, on all platforms it would be int in all other platforms. And, there is no need to check for the type in monolitic environment like Windows, as it will be always the same. Currently it fails cross compile windows in mingw-w64 compiler, as winsock.h is as follows: """ /* define WINSOCK_API_LINKAGE and WSAAPI for less * diff output between winsock.h and winsock2.h, but * remember to undefine them at the end of file */ """ And the macro uses these macros which are internal winsock macros and should not be used anyway. Also, when did the autodefs.h went mandatory? Why is it in tap-win32/common.h while no constant is actually used? The use of WSA_IO_INCOMPLETE without including winsock2.h is invalid! Look at http://msdn.microsoft.com/en-us/library/aa921087.aspx Signed-off-by: Alon Bar-Lev Acked-by: James Yonan Signed-off-by: David Sommerseth --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index e30f990..e0847bc 100644 --- a/configure.ac +++ b/configure.ac @@ -320,6 +320,7 @@ case "$host" in ;; *-mingw*) AC_DEFINE(TARGET_WIN32, 1, [Are we running WIN32?]) + CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN" OPENVPN_ADD_LIBS(-lgdi32) OPENVPN_ADD_LIBS(-lws2_32) OPENVPN_ADD_LIBS(-lwininet) -- cgit v1.2.3