summaryrefslogtreecommitdiff
path: root/src/network/core/os_abstraction.h
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2018-12-09 02:28:14 +0100
committerglx22 <glx22@users.noreply.github.com>2018-12-27 18:09:16 +0100
commitc540d7244531d501f16b485a3e45e358f98853be (patch)
tree4d270f06b2aa9b4f796d4828e5bfaf3c09cdd4b1 /src/network/core/os_abstraction.h
parent8890926b0d1069aec7ef53fd84868a7a3ca02c05 (diff)
downloadopenttd-c540d7244531d501f16b485a3e45e358f98853be.tar.xz
Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32
Diffstat (limited to 'src/network/core/os_abstraction.h')
-rw-r--r--src/network/core/os_abstraction.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/core/os_abstraction.h b/src/network/core/os_abstraction.h
index c24cc9f8f..c320cd910 100644
--- a/src/network/core/os_abstraction.h
+++ b/src/network/core/os_abstraction.h
@@ -21,7 +21,7 @@
#ifdef ENABLE_NETWORK
/* Windows stuff */
-#if defined(WIN32) || defined(WIN64)
+#if defined(_WIN32)
#include <errno.h>
#include <winsock2.h>
#include <ws2tcpip.h>
@@ -125,7 +125,7 @@ static inline void OTTDfreeaddrinfo(struct addrinfo *ai)
}
#define freeaddrinfo OTTDfreeaddrinfo
#endif /* __MINGW32__ && __CYGWIN__ */
-#endif /* WIN32 */
+#endif /* _WIN32 */
/* UNIX stuff */
#if defined(UNIX) && !defined(__OS2__)
@@ -290,7 +290,7 @@ typedef unsigned long in_addr_t;
*/
static inline bool SetNonBlocking(SOCKET d)
{
-#ifdef WIN32
+#ifdef _WIN32
u_long nonblocking = 1;
#else
int nonblocking = 1;