Skip to content

Commit 9c77483

Browse files
committed
build: avoid pipe2 on Darwin (for now)
macOS 27 will support pipe2 at runtime, and Xcode 27 (and Command Line Tools) support it at compile time. This means a macOS < 27 system will detect support for pipe2, but then binaries will crash at runtime, as pipe2 is not available. Just avoid pipe2 on macOS for now, and continue using pipe. Note that the compilation also produces availability warnings, and this will need to be backported.
1 parent 4a15e0b commit 9c77483

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎cmake/introspection.cmake‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ include(CheckCXXSymbolExists)
88
check_cxx_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC)
99
check_cxx_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
1010
check_cxx_symbol_exists(fork "unistd.h" HAVE_DECL_FORK)
11-
check_cxx_symbol_exists(pipe2 "unistd.h" HAVE_DECL_PIPE2)
11+
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
12+
check_cxx_symbol_exists(pipe2 "unistd.h" HAVE_DECL_PIPE2)
13+
endif()
1214
check_cxx_symbol_exists(setsid "unistd.h" HAVE_DECL_SETSID)
1315

1416
if(NOT WIN32)

0 commit comments

Comments
 (0)