curl: Fix passing _WINSOCKAPI_ macro to compiler

Define `_WINSOCKAPI_` blank rather than to 1 in order to match the
value used by Microsoft's winsock header files.

Backported from upstream curl commit 192466e0 (cmake: Fix passing
_WINSOCKAPI_ macro to compiler, 2017-01-09).

Fixes: #16545
This commit is contained in:
Brad King
2017-02-07 11:39:49 -05:00
parent 1df9d5f919
commit 73ae67006c

View File

@@ -316,7 +316,7 @@ include (CheckCSourceCompiles)
# On windows preload settings
if(WIN32)
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WINSOCKAPI_")
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WINSOCKAPI_=")
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
endif(WIN32)