From 4a5ece54b8ce0d3408e4d302b8a64b2a5aaa19cf Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 25 Mar 2024 12:15:01 +0000 Subject: [PATCH] build: fix mkdtemp check on macOS On macOS, mkdtemp is in unistd.h. Fix the CMake check so that is works. This was discovered when comparing the output of the Autotools an CMake build systems. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c124a6a4..200a82e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -605,7 +605,7 @@ if(NOT MSVC) check_cxx_symbol_exists(fork unistd.h HAVE_FORK) check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME) - check_cxx_symbol_exists(mkdtemp stdlib.h HAVE_MKDTEMP) + check_cxx_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP) check_cxx_symbol_exists(accept4 sys/socket.h HAVE_ACCEPT4) check_cxx_symbol_exists(strnlen string.h HAVE_STRNLEN) else()