summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/gethostbyht.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2006-05-12 15:37:23 +0000
committerume <ume@FreeBSD.org>2006-05-12 15:37:23 +0000
commitab3eacdf3106cb0b4027a6d928d9555815af0b48 (patch)
tree164cb97bf2cd0fc04b8135b782152c0960ca3354 /lib/libc/net/gethostbyht.c
parent08978d5bee9bfc81ae25a6b3a8971577532cc9aa (diff)
downloadFreeBSD-src-ab3eacdf3106cb0b4027a6d928d9555815af0b48.zip
FreeBSD-src-ab3eacdf3106cb0b4027a6d928d9555815af0b48.tar.gz
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>
Diffstat (limited to 'lib/libc/net/gethostbyht.c')
-rw-r--r--lib/libc/net/gethostbyht.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/net/gethostbyht.c b/lib/libc/net/gethostbyht.c
index 0782518..cb5009d 100644
--- a/lib/libc/net/gethostbyht.c
+++ b/lib/libc/net/gethostbyht.c
@@ -282,8 +282,9 @@ found:
int
_ht_gethostbyaddr(void *rval, void *cb_data, va_list ap)
{
- const char *addr;
- int len, af;
+ const void *addr;
+ socklen_t len;
+ int af;
char *buffer;
size_t buflen;
int *errnop, *h_errnop;
@@ -292,8 +293,8 @@ _ht_gethostbyaddr(void *rval, void *cb_data, va_list ap)
res_state statp;
int error;
- addr = va_arg(ap, const char *);
- len = va_arg(ap, int);
+ addr = va_arg(ap, const void *);
+ len = va_arg(ap, socklen_t);
af = va_arg(ap, int);
hptr = va_arg(ap, struct hostent *);
buffer = va_arg(ap, char *);
OpenPOWER on IntegriCloud