From e7189017e19dd5162f40a91050a730c5de982d9a Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Wed, 26 Dec 2007 14:37:09 +0000 Subject: Merge portability patch from Peter O'Gorman, fetchmail-devel 2007-10-31. This requires some minor fixes though. svn path=/branches/BRANCH_6-3/; revision=5145 --- KAME/getnameinfo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'KAME') 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 -- cgit v1.2.3