From: Daniel Stenberg Date: Mon, 23 Aug 2021 14:39:33 +0000 (+0200) Subject: cmake: avoid poll() on macOS X-Git-Tag: curl-7_79_0~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=825911be587bbabc3b7e4777ed3bd1bb7c858b58;p=thirdparty%2Fcurl.git cmake: avoid poll() on macOS ... like we do in configure builds. Since poll() on macOS is not reliable enough. Reported-by: marc-groundctl Fixes #7595 Closes #7619 --- diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index 7f369938f9..5cddf4afa9 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -237,6 +237,9 @@ endif() unset(CMAKE_TRY_COMPILE_TARGET_TYPE) if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) + if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + # only try this on non-macOS + # if not cross-compilation... include(CheckCSourceRuns) set(CMAKE_REQUIRED_FLAGS "") @@ -279,5 +282,6 @@ if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) } return 0; }" HAVE_POLL_FINE) + endif() endif()