diff options
author | bunnei <bunneidev@gmail.com> | 2020-12-08 00:32:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 00:32:06 +0100 |
commit | f782aecf4d130b45173d8a4a2556b13244317328 (patch) | |
tree | dc4f6ebabd5d0e9fe2abc9995f997faf56d3a73a /src/core | |
parent | Merge pull request #5149 from comex/xx-map-interval (diff) | |
parent | CMakeLists,network: Create YUZU_UNIX macro to replace __unix__ (diff) | |
download | yuzu-f782aecf4d130b45173d8a4a2556b13244317328.tar yuzu-f782aecf4d130b45173d8a4a2556b13244317328.tar.gz yuzu-f782aecf4d130b45173d8a4a2556b13244317328.tar.bz2 yuzu-f782aecf4d130b45173d8a4a2556b13244317328.tar.lz yuzu-f782aecf4d130b45173d8a4a2556b13244317328.tar.xz yuzu-f782aecf4d130b45173d8a4a2556b13244317328.tar.zst yuzu-f782aecf4d130b45173d8a4a2556b13244317328.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/network/network.cpp | 6 | ||||
-rw-r--r-- | src/core/network/sockets.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/network/network.cpp b/src/core/network/network.cpp index 5ef2e8511..5a8cc6fc2 100644 --- a/src/core/network/network.cpp +++ b/src/core/network/network.cpp @@ -11,7 +11,7 @@ #ifdef _WIN32 #define _WINSOCK_DEPRECATED_NO_WARNINGS // gethostname #include <winsock2.h> -#elif __unix__ +#elif YUZU_UNIX #include <errno.h> #include <fcntl.h> #include <netdb.h> @@ -54,7 +54,7 @@ constexpr IPv4Address TranslateIPv4(in_addr addr) { sockaddr TranslateFromSockAddrIn(SockAddrIn input) { sockaddr_in result; -#ifdef __unix__ +#if YUZU_UNIX result.sin_len = sizeof(result); #endif @@ -99,7 +99,7 @@ bool EnableNonBlock(SOCKET fd, bool enable) { return ioctlsocket(fd, FIONBIO, &value) != SOCKET_ERROR; } -#elif __unix__ // ^ _WIN32 v __unix__ +#elif YUZU_UNIX // ^ _WIN32 v YUZU_UNIX using SOCKET = int; using WSAPOLLFD = pollfd; diff --git a/src/core/network/sockets.h b/src/core/network/sockets.h index 7bdff0fe4..a44393325 100644 --- a/src/core/network/sockets.h +++ b/src/core/network/sockets.h @@ -9,7 +9,7 @@ #if defined(_WIN32) #include <winsock.h> -#elif !defined(__unix__) +#elif !YUZU_UNIX #error "Platform not implemented" #endif @@ -84,7 +84,7 @@ public: #if defined(_WIN32) SOCKET fd = INVALID_SOCKET; -#elif defined(__unix__) +#elif YUZU_UNIX int fd = -1; #endif }; |