summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPeng-Yu Chen <pengyu@libstarrify.so>2021-05-20 11:11:42 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-05-21 08:39:39 +0200
commit07d20f5dfa45fe0c3e7ef56b89028887e3c4dc47 (patch)
treebe687c680a02f9cff416f5247c54289515624c0e /CMakeLists.txt
parent84d2839740ca78041ac7419d9aaeac55c1e1c729 (diff)
downloadcurl-07d20f5dfa45fe0c3e7ef56b89028887e3c4dc47.tar.gz
cmake: detect CURL_SA_FAMILY_T
Fixes #7049 Closes #7065
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ffb72faf..fcbf9ed2b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1062,6 +1062,16 @@ if(HAVE_FSETXATTR)
endforeach()
endif()
+set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
+check_type_size("sa_family_t" SIZEOF_SA_FAMILY_T)
+set(HAVE_SA_FAMILY_T ${HAVE_SIZEOF_SA_FAMILY_T})
+set(CMAKE_EXTRA_INCLUDE_FILES "")
+
+set(CMAKE_EXTRA_INCLUDE_FILES "ws2def.h")
+check_type_size("ADDRESS_FAMILY" SIZEOF_ADDRESS_FAMILY)
+set(HAVE_ADDRESS_FAMILY ${HAVE_SIZEOF_ADDRESS_FAMILY})
+set(CMAKE_EXTRA_INCLUDE_FILES "")
+
# sigaction and sigsetjmp are special. Use special mechanism for
# detecting those, but only if previous attempt failed.
if(HAVE_SIGNAL_H)