build: unistd.h is manditory on unix platforms
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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@
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user