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:
parent
bc9861568a
commit
ce931fdf9e
|
@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue