From dae94d8adc351007982b467a67437832c6a9156c Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Mon, 28 Oct 2013 15:00:16 +0100 Subject: [PATCH] Windows Fix usage in Windows XP targetting projects This is important since this stuff is in publicly included headers and even though the usage of the WSAPoll API is a runtime decision the public headers may be used in code that needs to build with _WIN32_WINNT=0x0501 to support WinXP. When building a project using libwebsockets with that define set to 0x0501 winsock.h will not define the WSAPOLLFD struct causing that project to fail to compile. --- win32port/win32helpers/websock-w32.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/win32port/win32helpers/websock-w32.h b/win32port/win32helpers/websock-w32.h index 4c1a0cb6..97848893 100644 --- a/win32port/win32helpers/websock-w32.h +++ b/win32port/win32helpers/websock-w32.h @@ -26,6 +26,10 @@ #define DEF_POLL_STUFF #endif +#if _WIN32_WINNT < 0x0600 +#define DEF_POLL_STUFF +#endif + #ifdef DEF_POLL_STUFF #include