summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorYurii Rashkovskii <yrashk@gmail.com>2022-12-23 17:45:30 -0800
committerDaniel Stenberg <daniel@haxx.se>2022-12-26 09:32:37 +0100
commit5ee81c396322799e8c6aea7050861ea4817b74fa (patch)
tree2621012a38b84d2e3b8b73a6373cd6ff80051f4f /CMakeLists.txt
parent73477d5a4d54cc7cb63659eface5796b63e4ebed (diff)
downloadcurl-5ee81c396322799e8c6aea7050861ea4817b74fa.tar.gz
cmake: fix the snprintf detection
I haven't had the time to check other configurations, but on my macOS Ventura 13.1 with XCode 14.2 cmake does not find `snprintf`. Solution: ensure stdio.h is checked for definitions Closes #10155
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b43520751..2bed81eae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1092,7 +1092,7 @@ check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT)
if(NOT MSVC OR (MSVC_VERSION GREATER_EQUAL 1900))
# earlier MSVC compilers had faulty snprintf implementations
- check_symbol_exists(snprintf "${CURL_INCLUDES}" HAVE_SNPRINTF)
+ check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
endif()
check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME)
check_symbol_exists(inet_ntop "${CURL_INCLUDES}" HAVE_INET_NTOP)