From bf66c2eda88095d4910d396920c45781fd19db78 Mon Sep 17 00:00:00 2001 From: ume Date: Thu, 15 Feb 2001 10:35:55 +0000 Subject: Correct 2nd argument of getnameinfo(3) to socklen_t. Reviewed by: itojun --- include/netdb.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'include/netdb.h') diff --git a/include/netdb.h b/include/netdb.h index 4f34173..03b4f3e 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -61,8 +61,13 @@ #ifndef _NETDB_H_ #define _NETDB_H_ +#include #include -#include + +#ifdef _BSD_SIZE_T_ +typedef _BSD_SIZE_T_ size_t; +#undef _BSD_SIZE_T_ +#endif #ifndef _PATH_HEQUIV # define _PATH_HEQUIV "/etc/hosts.equiv" @@ -192,6 +197,14 @@ struct addrinfo { */ #define SCOPE_DELIMITER '%' +/* + * data types - basically forward decl for getnameinfo() + */ +#ifdef _BSD_SOCKLEN_T_ +typedef _BSD_SOCKLEN_T_ socklen_t; +#undef _BSD_SOCKLEN_T_ +#endif + __BEGIN_DECLS void endhostent __P((void)); void endnetent __P((void)); @@ -221,7 +234,7 @@ void setnetent __P((int)); void setprotoent __P((int)); int getaddrinfo __P((const char *, const char *, const struct addrinfo *, struct addrinfo **)); -int getnameinfo __P((const struct sockaddr *, size_t, char *, +int getnameinfo __P((const struct sockaddr *, socklen_t, char *, size_t, char *, size_t, int)); void freeaddrinfo __P((struct addrinfo *)); char *gai_strerror __P((int)); -- cgit v1.1