aboutsummaryrefslogtreecommitdiffstats
path: root/KAME/getnameinfo.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2007-12-26 14:37:09 +0000
committerMatthias Andree <matthias.andree@gmx.de>2007-12-26 14:37:09 +0000
commite7189017e19dd5162f40a91050a730c5de982d9a (patch)
tree678ce6efc0e26688e0686d8dbe7bab7a3fcb9b77 /KAME/getnameinfo.c
parentd723cc008d7793334260e6ac0d7412ce13e1cf29 (diff)
downloadfetchmail-e7189017e19dd5162f40a91050a730c5de982d9a.tar.gz
fetchmail-e7189017e19dd5162f40a91050a730c5de982d9a.tar.bz2
fetchmail-e7189017e19dd5162f40a91050a730c5de982d9a.zip
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
Diffstat (limited to 'KAME/getnameinfo.c')
-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