mirror of
https://github.com/curl/curl.git
synced 2026-04-10 23:51:42 +08:00
build: skip detecting pipe2() for Apple targets
To avoid (mis-)detecting it via the internal Apple library `/usr/lib/system/libsystem_sim_kernel.dylib` when targeting iPhone Simulator (seen with iPhoneSimulator26.4.sdk). Reported-by: Ian Spence Fixes #21236 Closes #21271
This commit is contained in:
parent
567803db79
commit
1737e47f59
@ -1646,7 +1646,6 @@ check_symbol_exists("getaddrinfo" "${CURL_INCLUDES};stdlib.h;string.h" HAVE_
|
||||
check_symbol_exists("getifaddrs" "${CURL_INCLUDES};stdlib.h" HAVE_GETIFADDRS) # ifaddrs.h
|
||||
check_symbol_exists("freeaddrinfo" "${CURL_INCLUDES}" HAVE_FREEADDRINFO) # ws2tcpip.h sys/socket.h netdb.h
|
||||
check_function_exists("pipe" HAVE_PIPE)
|
||||
check_function_exists("pipe2" HAVE_PIPE2)
|
||||
check_function_exists("eventfd" HAVE_EVENTFD)
|
||||
check_symbol_exists("getpeername" "${CURL_INCLUDES}" HAVE_GETPEERNAME) # winsock2.h unistd.h proto/bsdsocket.h
|
||||
check_symbol_exists("getsockname" "${CURL_INCLUDES}" HAVE_GETSOCKNAME) # winsock2.h unistd.h proto/bsdsocket.h
|
||||
@ -1654,6 +1653,13 @@ check_function_exists("getrlimit" HAVE_GETRLIMIT)
|
||||
check_function_exists("setlocale" HAVE_SETLOCALE)
|
||||
check_function_exists("setrlimit" HAVE_SETRLIMIT)
|
||||
|
||||
if(NOT APPLE)
|
||||
# Apple platforms do not offer pipe2(), but the iPhone Simulator-specific
|
||||
# /usr/lib/system/libsystem_sim_kernel.dylib exports it. To avoid false
|
||||
# detection, omit this feature check for Apple targets.
|
||||
check_function_exists("pipe2" HAVE_PIPE2)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
check_function_exists("if_nametoindex" HAVE_IF_NAMETOINDEX) # net/if.h
|
||||
check_function_exists("realpath" HAVE_REALPATH)
|
||||
|
||||
10
configure.ac
10
configure.ac
@ -4127,7 +4127,6 @@ AC_CHECK_FUNCS([\
|
||||
gettimeofday \
|
||||
mach_absolute_time \
|
||||
pipe \
|
||||
pipe2 \
|
||||
poll \
|
||||
sendmmsg \
|
||||
sendmsg \
|
||||
@ -4137,6 +4136,15 @@ AC_CHECK_FUNCS([\
|
||||
utimes \
|
||||
])
|
||||
|
||||
if test "$curl_cv_apple" != "yes"; then
|
||||
dnl Apple platforms do not offer pipe2(), but the iPhone Simulator-specific
|
||||
dnl /usr/lib/system/libsystem_sim_kernel.dylib exports it. To avoid false
|
||||
dnl detection, omit this feature check for Apple targets.
|
||||
AC_CHECK_FUNCS([\
|
||||
pipe2 \
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$curl_cv_native_windows" != "yes"; then
|
||||
AC_CHECK_FUNCS([\
|
||||
if_nametoindex \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user