summaryrefslogtreecommitdiff
path: root/pjlib
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2005-11-06 17:33:51 +0000
committerBenny Prijono <bennylp@teluu.com>2005-11-06 17:33:51 +0000
commit0d9f5f9606374883742efd189451f6fb81440139 (patch)
tree173104a8df933b37b2a2016540c26c55f698a789 /pjlib
parent33a8c1cb59304d92d517e3ba511bf233c729597f (diff)
Fixed error with inet_ntoa()
git-svn-id: http://svn.pjsip.org/repos/pjproject/main@15 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r--pjlib/src/pj/sock_bsd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pjlib/src/pj/sock_bsd.c b/pjlib/src/pj/sock_bsd.c
index 21c10d19..8f1fa1df 100644
--- a/pjlib/src/pj/sock_bsd.c
+++ b/pjlib/src/pj/sock_bsd.c
@@ -103,10 +103,14 @@ PJ_DEF(pj_uint32_t) pj_htonl(pj_uint32_t hostlong)
* to string in standard numbers and dots notation.
*/
PJ_DEF(char*) pj_inet_ntoa(pj_in_addr inaddr)
-{
+{
+#if !defined(PJ_LINUX) && !defined(PJ_LINUX_KERNEL)
+ return inet_ntoa(*(struct in_addr*)&inaddr);
+#else
struct in_addr addr;
addr.s_addr = inaddr.s_addr;
- return inet_ntoa(addr);
+ return inet_ntoa(addr);
+#endif
}
/*