summaryrefslogtreecommitdiff
path: root/drivers/unix/ip_unix.cpp
diff options
context:
space:
mode:
authorAriel Manzur <ariel@godotengine.org>2016-10-19 18:32:36 -0300
committerAriel Manzur <ariel@godotengine.org>2016-10-19 18:32:36 -0300
commit1d45f35a4a190360fea74e51b66457efe44d3177 (patch)
tree72cc77fef02085742cb62cee0fb35461adda6a7b /drivers/unix/ip_unix.cpp
parent887a897c02144f2d01896d3112bdae5ce7d6df5c (diff)
fixed some byte order and parsing problems
Diffstat (limited to 'drivers/unix/ip_unix.cpp')
-rw-r--r--drivers/unix/ip_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index 6294f57b03..d6d1be3395 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/drivers/unix/ip_unix.cpp
@@ -68,7 +68,7 @@ static IP_Address _sockaddr2ip(struct sockaddr* p_addr) {
IP_Address ip;
if (p_addr->sa_family == AF_INET) {
struct sockaddr_in* addr = (struct sockaddr_in*)p_addr;
- ip.field32[0] = ntohl(addr->sin_addr.s_addr);
+ ip.field32[0] = *((unsigned long*)&addr->sin_addr);
ip.type = IP_Address::TYPE_IPV4;
} else {
struct sockaddr_in6* addr6 = (struct sockaddr_in6*)p_addr;