diff options
-rw-r--r-- | include/arpa/inet.h | 4 | ||||
-rw-r--r-- | lib/libc/net/inet.3 | 6 | ||||
-rw-r--r-- | lib/libc/net/inet_ntop.c | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h index 4f177917c24..77ac649f32b 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */ +/* $OpenBSD: inet.h,v 1.11 2008/12/09 19:38:38 otto Exp $ */ /* * ++Copyright++ 1983, 1993 @@ -84,7 +84,7 @@ int inet_net_pton(int, const char *, void *, size_t) __attribute__((__bounded__(__string__,3,4))); char *inet_ntoa(struct in_addr); int inet_pton(int, const char *, void *); -const char *inet_ntop(int, const void *, char *, size_t) +const char *inet_ntop(int, const void *, char *, socklen_t) __attribute__ ((__bounded__(__string__,3,4))); unsigned int inet_nsap_addr(const char *, unsigned char *, int); char *inet_nsap_ntoa(int, const unsigned char *, char *); diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3 index c650df360b6..3f198ae8e0d 100644 --- a/lib/libc/net/inet.3 +++ b/lib/libc/net/inet.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: inet.3,v 1.21 2007/06/12 16:50:06 jmc Exp $ +.\" $OpenBSD: inet.3,v 1.22 2008/12/09 19:38:38 otto Exp $ .\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $ .\" .\" Copyright (c) 1983, 1990, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)inet.3 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: June 12 2007 $ +.Dd $Mdocdate: December 9 2008 $ .Dt INET 3 .Os .Sh NAME @@ -64,7 +64,7 @@ .Ft char * .Fn inet_ntoa "struct in_addr in" .Ft const char * -.Fn inet_ntop "int af" "const void *src" "char *dst" "size_t size" +.Fn inet_ntop "int af" "const void *src" "char *dst" "socklen_t size" .Ft int .Fn inet_pton "int af" "const char *src" "void *dst" .Sh DESCRIPTION diff --git a/lib/libc/net/inet_ntop.c b/lib/libc/net/inet_ntop.c index d36a0d78898..9deb352e24e 100644 --- a/lib/libc/net/inet_ntop.c +++ b/lib/libc/net/inet_ntop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_ntop.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ +/* $OpenBSD: inet_ntop.c,v 1.8 2008/12/09 19:38:38 otto Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -43,13 +43,13 @@ static const char *inet_ntop6(const u_char *src, char *dst, size_t size); * Paul Vixie, 1996. */ const char * -inet_ntop(int af, const void *src, char *dst, size_t size) +inet_ntop(int af, const void *src, char *dst, socklen_t size) { switch (af) { case AF_INET: - return (inet_ntop4(src, dst, size)); + return (inet_ntop4(src, dst, (size_t)size)); case AF_INET6: - return (inet_ntop6(src, dst, size)); + return (inet_ntop6(src, dst, (size_t)size)); default: errno = EAFNOSUPPORT; return (NULL); |