Skip to content

Commit

Permalink
build: fix mkdtemp check on macOS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fanquake committed Mar 25, 2024
1 parent 45b2924 commit e6d53c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -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()
Expand Down

0 comments on commit e6d53c5

Please sign in to comment.