summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl
diff options
context:
space:
mode:
authorygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 10:12:50 +0000
committerygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 10:12:50 +0000
commit5e26e66300a4c171f1e073e3cc2234bc5a20745b (patch)
treea102341dcc137416dcb50a6cd48d6d0be6f5c76a /ppapi/shared_impl
parente0a0c161161ffd1da71014eac78c684dc67edc9c (diff)
downloadchromium_src-5e26e66300a4c171f1e073e3cc2234bc5a20745b.zip
chromium_src-5e26e66300a4c171f1e073e3cc2234bc5a20745b.tar.gz
chromium_src-5e26e66300a4c171f1e073e3cc2234bc5a20745b.tar.bz2
Fixed PPAPINaClTest.TCPServerSocketPrivate.
ntons/htons functions are declared in ws2_32.dll which is not available in the Chrome's sandbox. That's why all PPB_NetAddress_Private functionality that depends on these functions fails on Windows. Defining them to _byteswap_ushort solves this problem. BUG=116480 TEST=PPAPINaClTest.TCPServerSocketPrivate Review URL: http://codereview.chromium.org/9700013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127933 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r--ppapi/shared_impl/private/net_address_private_impl.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/ppapi/shared_impl/private/net_address_private_impl.cc b/ppapi/shared_impl/private/net_address_private_impl.cc
index 74f9f3d..9d7ac2f 100644
--- a/ppapi/shared_impl/private/net_address_private_impl.cc
+++ b/ppapi/shared_impl/private/net_address_private_impl.cc
@@ -32,7 +32,9 @@
typedef ADDRESS_FAMILY sa_family_t;
#define s6_addr16 u.Word
-#endif
+#define ntohs(x) _byteswap_ushort(x)
+#define htons(x) _byteswap_ushort(x)
+#endif // OS_WIN
// The net address interface doesn't have a normal C -> C++ thunk since it
// doesn't actually have any proxy wrapping or associated objects; it's just a