build: remove HAVE_SYS_SOCKET define should be present on all unix systems
This commit is contained in:
@ -83,6 +83,9 @@ macro(configure_unix_libs)
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
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)
|
||||
|
||||
@ -13,9 +13,6 @@
|
||||
/* Define if you have a POSIX `sigwait` function. */
|
||||
#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. */
|
||||
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@
|
||||
|
||||
|
||||
@ -11,21 +11,8 @@
|
||||
#include "arch/IArchNetwork.h"
|
||||
|
||||
#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 <sys/socket.h>
|
||||
|
||||
#define ARCH_NETWORK ArchNetworkBSD
|
||||
#define TYPED_ADDR(type_, addr_) (reinterpret_cast<type_ *>(&addr_->m_addr))
|
||||
|
||||
Reference in New Issue
Block a user