From: John Starks Date: Fri, 10 Nov 2017 19:46:41 +0000 (-0800) Subject: cmake: Add missing setmode check X-Git-Tag: curl-7_57_0~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e850dafa55f0510565c3dd802d6e2179fde65b0;p=thirdparty%2Fcurl.git 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 3aaeb346e7..7b73b98f7c 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)