aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Starks <jostarks@ntdev.microsoft.com>2017-11-10 11:46:41 -0800
committerJay Satiro <raysatiro@yahoo.com>2017-11-10 15:38:23 -0500
commit2e850dafa55f0510565c3dd802d6e2179fde65b0 (patch)
treeed5ef1ddaa9bb4fe76d58568e3567835027b51fb
parent3619ee5febb220de917db642352f9ea4fc3e7843 (diff)
cmake: Add missing setmode check
Ensure HAVE_SETMODE is set to 1 on OSes that have setmode. Without this, curl will corrupt binary files when writing them to stdout on Windows. Closes https://github.com/curl/curl/pull/2067
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3aaeb346e..7b73b98f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -874,6 +874,7 @@ check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
check_symbol_exists(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT)
check_symbol_exists(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE)
+check_symbol_exists(setmode "${CURL_INCLUDES}" HAVE_SETMODE)
check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT)
check_symbol_exists(fcntl "${CURL_INCLUDES}" HAVE_FCNTL)
check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL)