]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gsocket.c
Unicode compilation fixes
[wxWidgets.git] / src / msw / gsocket.c
index 50121a09001fbcb889a87dbe02981e9157588216..86cfc7b913e4a03e8c2c96823f364e834fabc3b3 100644 (file)
@@ -1361,7 +1361,7 @@ GSocketError GAddress_INET_SetHostAddress(GAddress *address,
   CHECK_ADDRESS(address, INET);
 
   addr = &(((struct sockaddr_in *)address->m_addr)->sin_addr);
-  addr->s_addr = hostaddr;
+  addr->s_addr = htonl(hostaddr);;
 
   return GSOCK_NOERROR;
 }
@@ -1450,7 +1450,7 @@ unsigned long GAddress_INET_GetHostAddress(GAddress *address)
 
   addr = (struct sockaddr_in *)address->m_addr;
 
-  return addr->sin_addr.s_addr;
+  return ntohl(addr->sin_addr.s_addr);
 }
 
 unsigned short GAddress_INET_GetPort(GAddress *address)