forked from eden-emu/eden
[compat] fix solaris Qt build (#194)
Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: eden-emu/eden#194 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
c39e3bece6
commit
e807e32b1a
21 changed files with 105 additions and 76 deletions
|
@ -1199,8 +1199,8 @@ if (MINGW)
|
|||
endif()
|
||||
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
target_compile_definitions(core PRIVATE -DENABLE_WEB_SERVICE)
|
||||
target_link_libraries(core PRIVATE web_service)
|
||||
target_compile_definitions(core PUBLIC -DENABLE_WEB_SERVICE)
|
||||
target_link_libraries(core PUBLIC web_service)
|
||||
endif()
|
||||
|
||||
if (HAS_NCE)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#elif YUZU_UNIX
|
||||
#elif defined(__unix__)
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -77,7 +77,7 @@ SOCKET GetInterruptSocket() {
|
|||
sockaddr TranslateFromSockAddrIn(SockAddrIn input) {
|
||||
sockaddr_in result;
|
||||
|
||||
#if YUZU_UNIX
|
||||
#ifdef __unix__
|
||||
result.sin_len = sizeof(result);
|
||||
#endif
|
||||
|
||||
|
@ -162,7 +162,7 @@ Errno TranslateNativeError(int e, CallType call_type = CallType::Other) {
|
|||
}
|
||||
}
|
||||
|
||||
#elif YUZU_UNIX // ^ _WIN32 v YUZU_UNIX
|
||||
#elif defined(__unix__) // ^ _WIN32 v __unix__
|
||||
|
||||
using SOCKET = int;
|
||||
using WSAPOLLFD = pollfd;
|
||||
|
@ -835,7 +835,7 @@ std::pair<s32, Errno> Socket::Send(std::span<const u8> message, int flags) {
|
|||
ASSERT(flags == 0);
|
||||
|
||||
int native_flags = 0;
|
||||
#if YUZU_UNIX
|
||||
#ifdef __unix__
|
||||
native_flags |= MSG_NOSIGNAL; // do not send us SIGPIPE
|
||||
#endif
|
||||
const auto result = send(fd, reinterpret_cast<const char*>(message.data()),
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#elif YUZU_UNIX
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
|
@ -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 YUZU_UNIX
|
||||
#elif defined(__unix__)
|
||||
constexpr IPv4Address TranslateIPv4(in_addr addr) {
|
||||
const u32 bytes = addr.s_addr;
|
||||
return IPv4Address{static_cast<u8>(bytes), static_cast<u8>(bytes >> 8),
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "core/internal_network/socket_proxy.h"
|
||||
#include "network/network.h"
|
||||
|
||||
#if YUZU_UNIX
|
||||
#ifdef __unix__
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -9,7 +9,11 @@
|
|||
#include <utility>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#elif !YUZU_UNIX
|
||||
// windows
|
||||
#elif defined(__unix__)
|
||||
// unix
|
||||
#else
|
||||
// haiku
|
||||
#error "Platform not implemented"
|
||||
#endif
|
||||
|
||||
|
@ -24,7 +28,7 @@ struct ProxyPacket;
|
|||
|
||||
class SocketBase {
|
||||
public:
|
||||
#ifdef YUZU_UNIX
|
||||
#ifdef __unix__
|
||||
using SOCKET = int;
|
||||
static constexpr SOCKET INVALID_SOCKET = -1;
|
||||
static constexpr SOCKET SOCKET_ERROR = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue