aboutsummaryrefslogtreecommitdiffstats
path: root/KAME
diff options
context:
space:
mode:
Diffstat (limited to 'KAME')
-rw-r--r--KAME/getnameinfo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/KAME/getnameinfo.c b/KAME/getnameinfo.c
index fb97530e..62dee36b 100644
--- a/KAME/getnameinfo.c
+++ b/KAME/getnameinfo.c
@@ -291,8 +291,11 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
hostlen) == NULL)
return EAI_SYSTEM;
#else
- if (afd->a_af == AF_INET)
- strlcpy(host, inet_ntoa(addr), hostlen);
+ if (afd->a_af == AF_INET) {
+ struct in_addr addr_tmp;
+ addr_tmp.s_addr = addr;
+ strlcpy(host, inet_ntoa(addr_tmp), hostlen);
+ }
else
return EAI_FAMILY;
#endif