1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

mingw: fixes

This commit is contained in:
Ralph Lessmann 2017-12-01 11:36:31 +08:00 committed by Andy Green
parent 0724f8982a
commit 33b40e0ae4
3 changed files with 9 additions and 1 deletions

View file

@ -483,6 +483,7 @@ endif()
if (MINGW)
set(LWS_MINGW_SUPPORT 1)
set(CMAKE_C_FLAGS "-D__USE_MINGW_ANSI_STDIO ${CMAKE_C_FLAGS}")
add_definitions(-DWINVER=0x0601 -D_WIN32_WINNT=0x0601)
endif()
if (LWS_SSL_SERVER_WITH_ECDH_CERT)

View file

@ -27,6 +27,7 @@
#ifdef LWS_WITH_IPV6
#if defined(WIN32) || defined(_WIN32)
#include <wincrypt.h>
#include <Iphlpapi.h>
#else
#include <net/if.h>

View file

@ -19,8 +19,14 @@
*/
#if defined(_WIN32) && defined(EXTERNAL_POLL)
#if (WINVER < 0x0600)
#undef WINVER
#undef _WIN32_WINNT
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#define _WIN32_WINNT WINVER
#endif
#define poll(fdArray, fds, timeout) WSAPoll((LPWSAPOLLFD)(fdArray), (ULONG)(fds), (INT)(timeout))
#endif