From: Ulrich Drepper Date: Mon, 27 Sep 1999 00:18:24 +0000 (+0000) Subject: Adjust parameters of gethostbyaddr and gethostbyaddr_r. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7334d61429a29a02ed1dfa8ea76bab8c766c7adc;p=thirdparty%2Fglibc.git Adjust parameters of gethostbyaddr and gethostbyaddr_r. --- diff --git a/include/netdb.h b/include/netdb.h index 3311e45046c..8fffe3cc5dd 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -8,7 +8,7 @@ extern int __gethostent_r __P ((struct hostent *__restrict __result_buf, int *__restrict __h_errnop)); extern int __gethostbyaddr_r __P ((__const char *__restrict __addr, - int __len, int __type, + size_t __len, int __type, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index 9a8efd66d3b..5ebb434c6bf 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -625,7 +625,8 @@ gethostbyname2(name, af) struct hostent * gethostbyaddr(addr, len, af) const char *addr; /* XXX should have been def'd as u_char! */ - int len, af; + size_t len; + int af; { const u_char *uaddr = (const u_char *)addr; static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff }; diff --git a/resolv/netdb.h b/resolv/netdb.h index 5ad1df2c219..3afb0516d8c 100644 --- a/resolv/netdb.h +++ b/resolv/netdb.h @@ -113,7 +113,7 @@ extern struct hostent *gethostent __P ((void)); /* Return entry from host data base which address match ADDR with length LEN and type TYPE. */ -extern struct hostent *gethostbyaddr __P ((__const char *__addr, int __len, +extern struct hostent *gethostbyaddr __P ((__const char *__addr, size_t __len, int __type)); /* Return entry from host data base for host with NAME. */ @@ -135,7 +135,7 @@ extern int gethostent_r __P ((struct hostent *__restrict __result_buf, struct hostent **__restrict __result, int *__restrict __h_errnop)); -extern int gethostbyaddr_r __P ((__const char *__restrict __addr, int __len, +extern int gethostbyaddr_r __P ((__const char *__restrict __addr, size_t __len, int __type, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen,