diff options
Diffstat (limited to 'third_party/libjingle/overrides/talk/base/win32.h')
-rw-r--r-- | third_party/libjingle/overrides/talk/base/win32.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/third_party/libjingle/overrides/talk/base/win32.h b/third_party/libjingle/overrides/talk/base/win32.h index 9c6ea3f..5cb8d9f 100644 --- a/third_party/libjingle/overrides/talk/base/win32.h +++ b/third_party/libjingle/overrides/talk/base/win32.h @@ -47,11 +47,20 @@ typedef struct _TOKEN_MANDATORY_LABEL { #undef SetPort +#include <stdlib.h> #include <string> #include "talk/base/stringutils.h" #include "talk/base/basictypes.h" +// This is to remove the dependency to ws2_32.dll especially for chrome, +// where we don't load the ws2_32.dll in the render process. +// This is correct only on little-endian machines. +#define ntohl(x) _byteswap_ulong(x) +#define ntohs(x) _byteswap_ushort(x) +#define htonl(x) _byteswap_ulong(x) +#define htons(x) _byteswap_ushort(x) + namespace talk_base { const char* win32_inet_ntop(int af, const void *src, char* dst, socklen_t size); |