mirror of
https://github.com/curl/curl.git
synced 2026-05-30 18:47:29 +03:00
cmake: prefill/cache HAVE_STRUCT_SOCKADDR_STORAGE
Also add missing include to `OtherTests.cmake`. It didn't cause an issue because the parent already included this earlier by chance. Closes #12537
This commit is contained in:
parent
6d8d597431
commit
7e8fdad2d5
2 changed files with 5 additions and 3 deletions
|
|
@ -23,6 +23,7 @@
|
|||
###########################################################################
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckCSourceRuns)
|
||||
include(CheckTypeSize)
|
||||
|
||||
# The begin of the sources (macros and includes)
|
||||
set(_source_epilogue "#undef inline")
|
||||
|
|
@ -74,9 +75,9 @@ if(NOT WIN32)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
|
||||
if(NOT DEFINED HAVE_STRUCT_SOCKADDR_STORAGE)
|
||||
check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
set(HAVE_STRUCT_SOCKADDR_STORAGE ${HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE})
|
||||
endif()
|
||||
|
||||
unset(CMAKE_TRY_COMPILE_TARGET_TYPE)
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ set(HAVE_POSIX_STRERROR_R 0)
|
|||
set(HAVE_BUILTIN_AVAILABLE 0)
|
||||
set(HAVE_MSG_NOSIGNAL 0)
|
||||
set(HAVE_STRUCT_TIMEVAL 1)
|
||||
set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
|
||||
|
||||
set(HAVE_GETHOSTBYNAME_R_3 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue