summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/gethostbynis.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/gethostbynis.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/gethostbynis.c')
-rw-r--r--lib/libc/net/gethostbynis.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/net/gethostbynis.c b/lib/libc/net/gethostbynis.c
index 5ce6097..7921ced 100644
--- a/lib/libc/net/gethostbynis.c
+++ b/lib/libc/net/gethostbynis.c
@@ -178,8 +178,8 @@ _gethostbynisname_r(const char *name, int af, struct hostent *he,
}
static int
-_gethostbynisaddr_r(const char *addr, int len, int af, struct hostent *he,
- struct hostent_data *hed)
+_gethostbynisaddr_r(const void *addr, socklen_t len, int af,
+ struct hostent *he, struct hostent_data *hed)
{
char *map;
char numaddr[46];
@@ -227,7 +227,7 @@ _gethostbynisname(const char *name, int af)
}
struct hostent *
-_gethostbynisaddr(const char *addr, int len, int af)
+_gethostbynisaddr(const void *addr, socklen_t len, int af)
{
#ifdef YP
struct hostent *he;
@@ -303,8 +303,8 @@ int
_nis_gethostbyaddr(void *rval, void *cb_data, va_list ap)
{
#ifdef YP
- const char *addr;
- int len;
+ const void *addr;
+ socklen_t len;
int af;
char *buffer;
size_t buflen;
@@ -313,8 +313,8 @@ _nis_gethostbyaddr(void *rval, void *cb_data, va_list ap)
struct hostent_data *hed;
res_state statp;
- 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