int
-__nscd_gethostbyaddr_r (const char *addr, int len, int type,
+__nscd_gethostbyaddr_r (const char *addr, size_t len, int type,
struct hostent *resultbuf, char *buffer, size_t buflen,
int *h_errnop)
{
align2 = ((__alignof__ (char *) - ((cp + align1 + hst_resp.h_name_len)
- ((char *) 0)))
& (__alignof__ (char *) - 1));
- if (buflen < (align1 + hst_resp.h_name_len + align2 +
+ if (buflen < (align1 + hst_resp.h_name_len + align2
+ ((hst_resp.h_aliases_cnt + hst_resp.h_addr_list_cnt + 2)
* sizeof (char *))
+ hst_resp.h_addr_list_cnt * (type == AF_INET
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1998.
struct hostent *resultbuf,
char *buffer, size_t buflen,
int *h_errnop));
-extern int __nscd_gethostbyaddr_r __P ((const char *addr, int len, int type,
+extern int __nscd_gethostbyaddr_r __P ((const char *addr, size_t len, int type,
struct hostent *resultbuf,
char *buffer, size_t buflen,
int *h_errnop));