From f4e6f5e291bcbe142ad3911b4517ae7b25353ed3 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sun, 14 Dec 2008 18:50:21 +0100 Subject: [PATCH] Bring the prototype of gethostbyaddr(3) in line with the standard. http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyname.html --- include/netdb.h | 2 +- lib/libc/net/gethostbyname.3 | 2 +- lib/libc/net/gethostnamadr.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/netdb.h b/include/netdb.h index 7124aff739..85b2d3fc4b 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -219,7 +219,7 @@ void endnetgrent (void); void endprotoent (void); void endservent (void); void freehostent (struct hostent *); -struct hostent *gethostbyaddr (const char *, int, int); +struct hostent *gethostbyaddr (const void *, socklen_t, int); struct hostent *gethostbyname (const char *); struct hostent *gethostbyname2 (const char *, int); struct hostent *gethostent (void); diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3 index 8c50726021..64e25d035f 100644 --- a/lib/libc/net/gethostbyname.3 +++ b/lib/libc/net/gethostbyname.3 @@ -56,7 +56,7 @@ .Ft struct hostent * .Fn gethostbyname2 "const char *name" "int af" .Ft struct hostent * -.Fn gethostbyaddr "const char *addr" "int len" "int type" +.Fn gethostbyaddr "const void *addr" "socklen_t len" "int type" .Ft struct hostent * .Fn gethostent void .Ft void diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index c9e9fd6cf3..b1892db1ec 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -161,7 +161,7 @@ gethostbyname2(const char *name, int type) } struct hostent * -gethostbyaddr(const char *addr, int len, int type) +gethostbyaddr(const void *addr, socklen_t len, int type) { struct hostent *hp = 0; int nserv = 0; -- 2.41.0