Explorar el Código

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
Brad King hace 9 años
padre
commit
73ae67006c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Utilities/cmcurl/CMakeLists.txt

+ 1 - 1
Utilities/cmcurl/CMakeLists.txt

@@ -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)