summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/sock_bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src/pj/sock_bsd.c')
-rw-r--r--pjlib/src/pj/sock_bsd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pjlib/src/pj/sock_bsd.c b/pjlib/src/pj/sock_bsd.c
index 92495df2..21c10d19 100644
--- a/pjlib/src/pj/sock_bsd.c
+++ b/pjlib/src/pj/sock_bsd.c
@@ -104,7 +104,9 @@ PJ_DEF(pj_uint32_t) pj_htonl(pj_uint32_t hostlong)
*/
PJ_DEF(char*) pj_inet_ntoa(pj_in_addr inaddr)
{
- return inet_ntoa(*(struct in_addr*)&inaddr);
+ struct in_addr addr;
+ addr.s_addr = inaddr.s_addr;
+ return inet_ntoa(addr);
}
/*