Skip to content

Commit 4a5ece5

Browse files
fanquakebluca
authored andcommitted
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.
1 parent 45b2924 commit 4a5ece5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ if(NOT MSVC)
605605

606606
check_cxx_symbol_exists(fork unistd.h HAVE_FORK)
607607
check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME)
608-
check_cxx_symbol_exists(mkdtemp stdlib.h HAVE_MKDTEMP)
608+
check_cxx_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP)
609609
check_cxx_symbol_exists(accept4 sys/socket.h HAVE_ACCEPT4)
610610
check_cxx_symbol_exists(strnlen string.h HAVE_STRNLEN)
611611
else()

0 commit comments

Comments
 (0)