File tree 2 files changed +19
-12
lines changed
2 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -179,17 +179,20 @@ int main(void) {
179
179
180
180
181
181
include (CheckCSourceRuns)
182
- set (CMAKE_REQUIRED_FLAGS)
183
- if (HAVE_SYS_POLL_H)
184
- set (CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H" )
185
- endif (HAVE_SYS_POLL_H)
186
- check_c_source_runs("
187
- #ifdef HAVE_SYS_POLL_H
188
- # include <sys/poll.h>
189
- #endif
190
- int main(void) {
191
- return poll((void *)0, 0, 10 /*ms*/);
192
- }" HAVE_POLL_FINE)
182
+ # See HAVE_POLL in CMakeLists.txt for why poll is disabled on macOS
183
+ if (NOT APPLE )
184
+ set (CMAKE_REQUIRED_FLAGS)
185
+ if (HAVE_SYS_POLL_H)
186
+ set (CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H" )
187
+ endif (HAVE_SYS_POLL_H)
188
+ check_c_source_runs("
189
+ #ifdef HAVE_SYS_POLL_H
190
+ # include <sys/poll.h>
191
+ #endif
192
+ int main(void) {
193
+ return poll((void *)0, 0, 10 /*ms*/);
194
+ }" HAVE_POLL_FINE)
195
+ endif ()
193
196
194
197
set (HAVE_SIG_ATOMIC_T 1)
195
198
set (CMAKE_REQUIRED_FLAGS)
Original file line number Diff line number Diff line change @@ -742,7 +742,11 @@ endif()
742
742
743
743
check_symbol_exists(basename "${CURL_INCLUDES} " HAVE_BASENAME)
744
744
check_symbol_exists(socket "${CURL_INCLUDES} " HAVE_SOCKET)
745
- check_symbol_exists(poll "${CURL_INCLUDES} " HAVE_POLL)
745
+ # poll on macOS is unreliable, it first did not exist, then was broken until
746
+ # fixed in 10.9 only to break again in 10.12.
747
+ if (NOT APPLE )
748
+ check_symbol_exists(poll "${CURL_INCLUDES} " HAVE_POLL)
749
+ endif ()
746
750
check_symbol_exists(select "${CURL_INCLUDES} " HAVE_SELECT)
747
751
check_symbol_exists(strdup "${CURL_INCLUDES} " HAVE_STRDUP)
748
752
check_symbol_exists(strstr "${CURL_INCLUDES} " HAVE_STRSTR)
You can’t perform that action at this time.
0 commit comments