summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-05-15 10:50:40 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-05-15 10:50:40 +0000
commit5c450ce8765cfb580e0e9cc9426009174ee85929 (patch)
tree6b88ecf25f8189330dccef9f90523a420d7e9279
parent3dc1b0d4463753c3e4cc1ea6022f502c0fcf5e20 (diff)
correct type of 2nd argument to meet RFC2553. (this should raise no ABI
problem due to type promotion). PR 1228.
-rw-r--r--include/netdb.h4
-rw-r--r--lib/libc/net/getnameinfo.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/include/netdb.h b/include/netdb.h
index 911d0cf7dbe..49b13260635 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: netdb.h,v 1.9 2000/02/09 12:22:08 itojun Exp $ */
+/* $OpenBSD: netdb.h,v 1.10 2000/05/15 10:50:39 itojun Exp $ */
/*
* ++Copyright++ 1980, 1983, 1988, 1993
@@ -214,7 +214,7 @@ void setservent __P((int));
int getaddrinfo __P((const char *name, const char *service,
const struct addrinfo *req, struct addrinfo **pai));
void freeaddrinfo __P((struct addrinfo *ai));
-int getnameinfo __P((const struct sockaddr *sa, size_t addrlen,
+int getnameinfo __P((const struct sockaddr *sa, socklen_t addrlen,
char *host, size_t hostlen, char *serv, size_t servlen,
int flags));
char *gai_strerror __P((int ecode));
diff --git a/lib/libc/net/getnameinfo.c b/lib/libc/net/getnameinfo.c
index 673ead74ba9..54d26485fb2 100644
--- a/lib/libc/net/getnameinfo.c
+++ b/lib/libc/net/getnameinfo.c
@@ -1,10 +1,10 @@
-/* $OpenBSD: getnameinfo.c,v 1.14 2000/04/26 16:08:12 itojun Exp $ */
+/* $OpenBSD: getnameinfo.c,v 1.15 2000/05/15 10:50:39 itojun Exp $ */
/* $KAME: getnameinfo.c,v 1.38 2000/04/26 15:58:50 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -16,7 +16,7 @@
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -89,7 +89,7 @@ struct sockinet {
static int ip6_parsenumeric __P((const struct sockaddr *, const char *, char *,
size_t, int));
static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t, int));
-#endif
+#endif
#define ENI_NOSOCKET 0
#define ENI_NOSERVNAME 1
@@ -102,7 +102,7 @@ static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t, int));
int
getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
const struct sockaddr *sa;
- size_t salen;
+ socklen_t salen;
char *host;
size_t hostlen;
char *serv;
@@ -352,7 +352,7 @@ ip6_sa2str(sa6, buf, bufsiz, flags)
return(snprintf(buf, bufsiz, "%d", sa6->sin6_scope_id));
}
#endif
-
+
/* if_indextoname() does not take buffer size. not a good api... */
if ((IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) &&
bufsiz >= IF_NAMESIZE) {