diff options
author | Viktor Szakats <commit@vsz.me> | 2022-10-11 07:42:16 +0000 |
---|---|---|
committer | Viktor Szakats <commit@vsz.me> | 2022-10-11 07:42:16 +0000 |
commit | 3b4837459b856fa1c0578f0a08d47379de37bd53 (patch) | |
tree | 1845f837f346f4e03fd9a0f8106c585254958ead /CMakeLists.txt | |
parent | 23151d667fbabab5bdf88b5394292ca72976d306 (diff) | |
download | curl-3b4837459b856fa1c0578f0a08d47379de37bd53.tar.gz |
cmake: add missing inet_ntop check
This adds the missing half of the check, next to the other half
already present in `lib/curl_config.h.cmake`.
Force disable `HAVE_INET_NTOP` for old MSVC where it caused compiler
warnings.
Reviewed-by: Daniel Stenberg
Closes #9689
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d3b4fc756..3d11fc593 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1065,6 +1065,10 @@ if(NOT MSVC OR (MSVC_VERSION GREATER_EQUAL 1900)) check_symbol_exists(snprintf "${CURL_INCLUDES}" HAVE_SNPRINTF) endif() check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME) +check_symbol_exists(inet_ntop "${CURL_INCLUDES}" HAVE_INET_NTOP) +if(MSVC AND (MSVC_VERSION LESS_EQUAL 1600)) + set(HAVE_INET_NTOP OFF) +endif() check_symbol_exists(inet_pton "${CURL_INCLUDES}" HAVE_INET_PTON) check_symbol_exists(fsetxattr "${CURL_INCLUDES}" HAVE_FSETXATTR) |