build: drop unused feature-detection code for Apple poll()
Drop Apple-specific detection logic for `poll()`. This detection snippet has been disabled for Apple in both configure and cmake, for `poll()` being broken on Apple since 10.12 Sierra (2016). Also replace `exit(1);` with `return 1;` in configure, to make the snippets match. Added in9297ca49f5#1057 (2016-10-11). Disabled for: configure/darwin ina34c7ce754(2016-10-18) cmake/macOS in825911be58#7619 cmake/iOS ind14831233d#8244 cmake/all Apple ina86254b393#12515 Closes #14718
This commit is contained in:
parent
7c49279aaa
commit
cc8b813765
@ -88,23 +88,6 @@ if(NOT CMAKE_CROSSCOMPILING AND NOT APPLE)
|
||||
if(0 != poll(0, 0, 10)) {
|
||||
return 1; /* fail */
|
||||
}
|
||||
else {
|
||||
/* detect the 10.12 poll() breakage */
|
||||
struct timeval before, after;
|
||||
int rc;
|
||||
size_t us;
|
||||
|
||||
gettimeofday(&before, NULL);
|
||||
rc = poll(NULL, 0, 500);
|
||||
gettimeofday(&after, NULL);
|
||||
|
||||
us = (after.tv_sec - before.tv_sec) * 1000000 +
|
||||
(after.tv_usec - before.tv_usec);
|
||||
|
||||
if(us < 400000) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}" HAVE_POLL_FINE)
|
||||
endif()
|
||||
|
||||
@ -3477,26 +3477,10 @@ AC_DEFUN([CURL_CHECK_FUNC_POLL], [
|
||||
AC_LANG_PROGRAM([[
|
||||
$curl_includes_stdlib
|
||||
$curl_includes_poll
|
||||
$curl_includes_time
|
||||
]],[[
|
||||
/* detect the original poll() breakage */
|
||||
if(0 != poll(0, 0, 10))
|
||||
exit(1); /* fail */
|
||||
else {
|
||||
/* detect the 10.12 poll() breakage */
|
||||
struct timeval before, after;
|
||||
int rc;
|
||||
size_t us;
|
||||
|
||||
gettimeofday(&before, NULL);
|
||||
rc = poll(NULL, 0, 500);
|
||||
gettimeofday(&after, NULL);
|
||||
|
||||
us = (after.tv_sec - before.tv_sec) * 1000000 +
|
||||
(after.tv_usec - before.tv_usec);
|
||||
|
||||
if(us < 400000)
|
||||
exit(1);
|
||||
if(0 != poll(0, 0, 10)) {
|
||||
return 1; /* fail */
|
||||
}
|
||||
]])
|
||||
],[
|
||||
|
||||
Loading…
Reference in New Issue
Block a user