mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
cmake: disable poll for macOS
Mirrors the autotools behavior introduced with curl-7_50_3-83-ga34c7ce. Fixes #1089
This commit is contained in:
parent
4564636781
commit
6aa9cfa2b9
2 changed files with 19 additions and 12 deletions
|
|
@ -179,17 +179,20 @@ int main(void) {
|
|||
|
||||
|
||||
include(CheckCSourceRuns)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
if(HAVE_SYS_POLL_H)
|
||||
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H")
|
||||
endif(HAVE_SYS_POLL_H)
|
||||
check_c_source_runs("
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
int main(void) {
|
||||
return poll((void *)0, 0, 10 /*ms*/);
|
||||
}" HAVE_POLL_FINE)
|
||||
# See HAVE_POLL in CMakeLists.txt for why poll is disabled on macOS
|
||||
if(NOT APPLE)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
if(HAVE_SYS_POLL_H)
|
||||
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H")
|
||||
endif(HAVE_SYS_POLL_H)
|
||||
check_c_source_runs("
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
int main(void) {
|
||||
return poll((void *)0, 0, 10 /*ms*/);
|
||||
}" HAVE_POLL_FINE)
|
||||
endif()
|
||||
|
||||
set(HAVE_SIG_ATOMIC_T 1)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue