From 825911be587bbabc3b7e4777ed3bd1bb7c858b58 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 23 Aug 2021 16:39:33 +0200 Subject: [PATCH] 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 --- CMake/OtherTests.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index 7f369938f..5cddf4afa 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()