From bd529ea3f3f96dfc27e3f0f771bbfe550e4e1f5c Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Tue, 3 Feb 2015 13:31:33 +0000 Subject: [PATCH] MinGW: libuv needs -D_WIN32_WINNT=0x0600 Without this compilation fails due to a missing symbol: SRWLOCK in libuv headers. _WIN32_WINNT defines the Windows header version that is to be used, and it seems libuv requires this version. See https://github.com/joyent/libuv/commit/b471b33da88da0ca0b913573370cc6919ec134e7 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43f283d8f7..29ef806612 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,6 +197,7 @@ endif() if(MINGW) # Use POSIX compatible stdio in Mingw add_definitions(-D__USE_MINGW_ANSI_STDIO) + add_definitions(-D_WIN32_WINNT=0x0600) endif() # OpenBSD's GCC (4.2.1) doesn't have -Wvla