build: remove HAVE_SYS_SOCKET define should be present on all unix systems

This commit is contained in:
sithlord48
2025-06-13 22:26:42 -04:00
committed by Nick Bolton
parent cb05ece6b6
commit eac59768ea
3 changed files with 4 additions and 17 deletions

View File

@ -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)

View File

@ -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@

View File

@ -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))