summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy/Globals.h
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/ProtoProxy/Globals.h')
-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