]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
gethostbyname.3: Move mention of <sys/socket.h> from SYNOPSIS to DESCRIPTION
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 1 Jan 2021 11:23:57 +0000 (12:23 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 1 Jan 2021 11:26:47 +0000 (12:26 +0100)
The functions are all declared in <netdb.h>. <sys/socket.h> is only
needed for the AF_* constants.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/gethostbyname.3

index 5d074a924bbb14d6e21140ae974dfc97e0291a77..266d4aaf29d9299113191899203cc90f578f2b38 100644 (file)
@@ -50,7 +50,6 @@ gethostent_r \- get network host entry
 .PP
 .BI "struct hostent *gethostbyname(const char *" name );
 .PP
-.BR "#include <sys/socket.h>" "       /* for AF_INET */"
 .BI "struct hostent *gethostbyaddr(const void *" addr ,
 .BI "                              socklen_t " len ", int " type );
 .PP
@@ -200,7 +199,9 @@ for the given host address \fIaddr\fP of length \fIlen\fP and address type
 Valid address types are
 .B AF_INET
 and
-.BR AF_INET6 .
+.BR AF_INET6
+(defined in
+.IR <sys/socket.h> ).
 The host address argument is a pointer to a struct of a type depending
 on the address type, for example a \fIstruct in_addr *\fP (probably
 obtained via a call to