[cmake] refactor: SDL2 CI and CPMUtil::AddCIPackage #284

Merged
Shinmegumi merged 13 commits from feature/sdl2-ci into master 2025-08-23 19:42:50 +02:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 244dacd44f - Show all commits

View file

@ -12,7 +12,7 @@
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#elif defined(__unix__)
#elif defined(__unix__) || defined(__APPLE__)
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
@ -162,7 +162,7 @@ Errno TranslateNativeError(int e, CallType call_type = CallType::Other) {
}
}
#elif defined(__unix__) // ^ _WIN32 v __unix__
#elif defined(__unix__) || defined(__APPLE__) // ^ _WIN32 v __unix__
using SOCKET = int;
using WSAPOLLFD = pollfd;

View file

@ -104,7 +104,7 @@ constexpr IPv4Address TranslateIPv4(in_addr addr) {
auto& bytes = addr.S_un.S_un_b;
return IPv4Address{bytes.s_b1, bytes.s_b2, bytes.s_b3, bytes.s_b4};
}
#elif defined(__unix__)
#elif defined(__unix__) || defined(__APPLE__)
constexpr IPv4Address TranslateIPv4(in_addr addr) {
const u32 bytes = addr.s_addr;
return IPv4Address{static_cast<u8>(bytes), static_cast<u8>(bytes >> 8),

View file

@ -10,7 +10,7 @@
#if defined(_WIN32)
// windows
#elif defined(__unix__)
#elif defined(__unix__) || defined(__APPLE__)
// unix
#else
// haiku
@ -28,7 +28,7 @@ struct ProxyPacket;
class SocketBase {
public:
#ifdef __unix__
#if defined(__unix__) || defined(__APPLE__)
using SOCKET = int;
static constexpr SOCKET INVALID_SOCKET = -1;
static constexpr SOCKET SOCKET_ERROR = -1;