trac41 WIN32 add wsockcompat.h
authorAndy Green <andy.green@linaro.org>
Sat, 26 Oct 2013 13:18:44 +0000 (21:18 +0800)
committerAndy Green <andy.green@linaro.org>
Sat, 26 Oct 2013 13:18:44 +0000 (21:18 +0800)
Using Windows 7 64 bit, cloned repo on 20130926. Using Qt creator and Microsoft Visual C++ Compiler 9.0 (x86).
Result (errors from compile output): D:\Projects\CDPStudioAPI\libwebsockets_orig\lib\client-handshake.c:87: error: C2065: 'EALREADY' : undeclared identifier
D:\Projects\CDPStudioAPI\libwebsockets_orig\lib\client-handshake.c:87: error: C2065: 'EINPROGRESS' : undeclared identifier
Possible solution is to use wsockcompat.h (compatibility header for using EALREADY, EINPROGRESS etc in older versions of Windows SDK). Compiled fine when I #included wsockcompat.h into client-handshake.c

Reported-by: mart22n via Trac 41
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/private-libwebsockets.h

index 24ee858..13a67e2 100644 (file)
@@ -70,6 +70,7 @@
 #endif
 #endif
 #include <winsock2.h>
+#include <wsockcompat.h>
 #include <ws2ipdef.h>
 #include <windows.h>
 #else