summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy/Globals.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-17 13:15:54 +0100
committermadmaxoft <github@xoft.cz>2014-01-17 13:15:54 +0100
commit1aeecdbe43fbcd839e3a4927bfad9a5d8ae5dad7 (patch)
treec8944232bb7067e4e290f5c7074408a7dbebe6f3 /Tools/ProtoProxy/Globals.h
parentProtoProxy: Fixed inversed typedef. (diff)
downloadcuberite-1aeecdbe43fbcd839e3a4927bfad9a5d8ae5dad7.tar
cuberite-1aeecdbe43fbcd839e3a4927bfad9a5d8ae5dad7.tar.gz
cuberite-1aeecdbe43fbcd839e3a4927bfad9a5d8ae5dad7.tar.bz2
cuberite-1aeecdbe43fbcd839e3a4927bfad9a5d8ae5dad7.tar.lz
cuberite-1aeecdbe43fbcd839e3a4927bfad9a5d8ae5dad7.tar.xz
cuberite-1aeecdbe43fbcd839e3a4927bfad9a5d8ae5dad7.tar.zst
cuberite-1aeecdbe43fbcd839e3a4927bfad9a5d8ae5dad7.zip
Diffstat (limited to '')
-rw-r--r--Tools/ProtoProxy/Globals.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tools/ProtoProxy/Globals.h b/Tools/ProtoProxy/Globals.h
index fab6adc5b..7415c9e62 100644
--- a/Tools/ProtoProxy/Globals.h
+++ b/Tools/ProtoProxy/Globals.h
@@ -95,6 +95,7 @@ typedef unsigned short UInt16;
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <winsock2.h>
+ #include <ws2tcpip.h>
// Windows SDK defines min and max macros, messing up with our std::min and std::max usage
#undef min
@@ -104,6 +105,8 @@ typedef unsigned short UInt16;
#ifdef GetFreeSpace
#undef GetFreeSpace
#endif // GetFreeSpace
+
+ #define SocketError WSAGetLastError()
#else
#include <sys/types.h>
#include <sys/stat.h> // for mkdir
@@ -116,6 +119,7 @@ typedef unsigned short UInt16;
#include <dirent.h>
#include <errno.h>
#include <iostream>
+ #include <unistd.h>
#include <cstdio>
#include <cstring>
@@ -129,6 +133,8 @@ typedef unsigned short UInt16;
{
INVALID_SOCKET = -1,
};
+ #define closesocket close
+ #define SocketError errno
#if !defined(ANDROID_NDK)
#include <tr1/memory>
#endif