aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libc/net/gethostbyname.3
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2006-05-12 15:37:23 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2006-05-12 15:37:23 +0000
commit3da59cd0072b20be9464c3f0afe83579fc83909c (patch)
tree164cb97bf2cd0fc04b8135b782152c0960ca3354 /lib/libc/net/gethostbyname.3
parentb484e04bf9e39dfee879785d3be04753ce5f3635 (diff)
downloadsrc-3da59cd0072b20be9464c3f0afe83579fc83909c.tar.gz
src-3da59cd0072b20be9464c3f0afe83579fc83909c.zip
Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1:
http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyaddr.html gethostbyaddr_r() is changed as well. It breaks ABI backward compatibility on 64 bit arch. So, we fix it on 32 bit arch only for now. Reported by: Rostislav Krasny <rosti.bsd@gmail.com>
Notes
Notes: svn path=/head/; revision=158477
Diffstat (limited to 'lib/libc/net/gethostbyname.3')
-rw-r--r--lib/libc/net/gethostbyname.34
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3
index 6f9ee0dce1f1..7c83d0270afd 100644
--- a/lib/libc/net/gethostbyname.3
+++ b/lib/libc/net/gethostbyname.3
@@ -55,7 +55,7 @@
.Ft struct hostent *
.Fn gethostbyname2 "const char *name" "int af"
.Ft struct hostent *
-.Fn gethostbyaddr "const char *addr" "int len" "int type"
+.Fn gethostbyaddr "const void *addr" "socklen_t len" "int type"
.Ft struct hostent *
.Fn gethostent void
.Ft void
@@ -246,7 +246,7 @@ struct hostent *hp;
if (!inet_aton(ipstr, &ip))
errx(1, "can't parse IP address %s", ipstr);
-if ((hp = gethostbyaddr((const char *)&ip,
+if ((hp = gethostbyaddr((const void *)&ip,
sizeof ip, AF_INET)) == NULL)
errx(1, "no name associated with %s", ipstr);