summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2001-02-15 10:35:55 +0000
committerume <ume@FreeBSD.org>2001-02-15 10:35:55 +0000
commitbf66c2eda88095d4910d396920c45781fd19db78 (patch)
treefec467d8f011430483519c5b12d0778cc7154c94 /include
parent126eb13f1ad3a376c386474ffbc2051157e8b493 (diff)
downloadFreeBSD-src-bf66c2eda88095d4910d396920c45781fd19db78.zip
FreeBSD-src-bf66c2eda88095d4910d396920c45781fd19db78.tar.gz
Correct 2nd argument of getnameinfo(3) to socklen_t.
Reviewed by: itojun
Diffstat (limited to 'include')
-rw-r--r--include/netdb.h17
1 files changed, 15 insertions, 2 deletions
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 <machine/ansi.h>
#include <sys/cdefs.h>
-#include <sys/types.h>
+
+#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));
OpenPOWER on IntegriCloud