build: unistd.h is manditory on unix platforms
This commit is contained in:
parent
3eef21c8df
commit
87704fedb1
4 changed files with 6 additions and 10 deletions
|
|
@ -83,7 +83,12 @@ macro(configure_unix_libs)
|
||||||
include(CheckCSourceCompiles)
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
check_include_files(sys/socket.h HAVE_SYS_SOCKET_H)
|
check_include_files(sys/socket.h HAVE_SYS_SOCKET_H)
|
||||||
|
|
||||||
|
|
||||||
check_include_files(unistd.h HAVE_UNISTD_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(sigwait HAVE_POSIX_SIGWAIT)
|
||||||
check_function_exists(inet_aton HAVE_INET_ATON)
|
check_function_exists(inet_aton HAVE_INET_ATON)
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,6 @@
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@
|
#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. */
|
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
|
||||||
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@
|
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
|
||||||
#if HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(TCP_NODELAY)
|
#if !defined(TCP_NODELAY)
|
||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,8 @@
|
||||||
#include "mt/Thread.h"
|
#include "mt/Thread.h"
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#if HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
// EventQueueTimer
|
// EventQueueTimer
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue