Index: third_party/libjingle/overrides/talk/base/win32.h |
=================================================================== |
--- third_party/libjingle/overrides/talk/base/win32.h (revision 124023) |
+++ third_party/libjingle/overrides/talk/base/win32.h (working copy) |
@@ -47,11 +47,20 @@ |
#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); |