← Commit list

1737e47f59

Viktor Szakats
Viktor Szakats
2026-04-08
SUCCESS Duration: 236s

Subject

build: skip detecting `pipe2()` for Apple targets

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

CMakeLists.txt+7 -1
@@ -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)
configure.ac+9 -1
@@ -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 \