build: unistd.h is manditory on unix platforms

This commit is contained in:
sithlord48
2025-06-13 21:46:49 -04:00
committed by Nick Bolton
parent 3eef21c8df
commit 87704fedb1
4 changed files with 6 additions and 10 deletions

View File

@ -83,7 +83,12 @@ macro(configure_unix_libs)
include(CheckCSourceCompiles)
check_include_files(sys/socket.h HAVE_SYS_SOCKET_H)
check_include_files(unistd.h HAVE_UNISTD_H)
if (NOT HAVE_UNISTD_H)
message(FATAL_ERROR "Missing unistd.h")
endif()
check_function_exists(sigwait HAVE_POSIX_SIGWAIT)
check_function_exists(inet_aton HAVE_INET_ATON)