Fixed error with inet_ntoa()

git-svn-id: https://svn.pjsip.org/repos/pjproject/main@15 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Benny Prijono 2005-11-06 17:33:51 +00:00
parent bc9861568a
commit ce931fdf9e
1 changed files with 6 additions and 2 deletions

View File

@ -104,9 +104,13 @@ PJ_DEF(pj_uint32_t) pj_htonl(pj_uint32_t hostlong)
*/
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);
#endif
}
/*