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)

View File

@ -31,9 +31,6 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@

View File

@ -18,10 +18,7 @@
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if !defined(TCP_NODELAY)
#include <netinet/tcp.h>

View File

@ -13,11 +13,8 @@
#include "mt/Thread.h"
#include <fcntl.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <poll.h>
#include <unistd.h>
//
// EventQueueTimer