build: remove HAVE_SYS_SOCKET define should be present on all unix systems
This commit is contained in:
parent
cb05ece6b6
commit
eac59768ea
3 changed files with 4 additions and 17 deletions
|
|
@ -83,6 +83,9 @@ 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)
|
||||||
|
if (NOT HAVE_SYS_SOCKET_H)
|
||||||
|
message(FATAL_ERROR "Missing header: sys/socket.h")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,6 @@
|
||||||
/* Define if you have a POSIX `sigwait` function. */
|
/* Define if you have a POSIX `sigwait` function. */
|
||||||
#cmakedefine HAVE_POSIX_SIGWAIT @HAVE_POSIX_SIGWAIT@
|
#cmakedefine HAVE_POSIX_SIGWAIT @HAVE_POSIX_SIGWAIT@
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
|
||||||
#cmakedefine HAVE_SYS_SOCKET_H @HAVE_SYS_SOCKET_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@
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,21 +11,8 @@
|
||||||
#include "arch/IArchNetwork.h"
|
#include "arch/IArchNetwork.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#if HAVE_SYS_SOCKET_H
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#else
|
|
||||||
struct sockaddr_storage
|
|
||||||
{
|
|
||||||
unsigned char ss_len; /* address length */
|
|
||||||
unsigned char ss_family; /* [XSI] address family */
|
|
||||||
char __ss_pad1[_SS_PAD1SIZE];
|
|
||||||
long long __ss_align; /* force structure storage alignment */
|
|
||||||
char __ss_pad2[_SS_PAD2SIZE];
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#define ARCH_NETWORK ArchNetworkBSD
|
#define ARCH_NETWORK ArchNetworkBSD
|
||||||
#define TYPED_ADDR(type_, addr_) (reinterpret_cast<type_ *>(&addr_->m_addr))
|
#define TYPED_ADDR(type_, addr_) (reinterpret_cast<type_ *>(&addr_->m_addr))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue