As of release 3.43 on 2012-08-05, the man page for getnameinfo(3) contains the following in its first paragraph: "It combines the functionality of gethostbyaddr(3) and getservbyport(3), but unlike those functions, getaddrinfo(3) is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies." This text is identical to what's in getaddrinfo(3). It seems someone copied it but didn't rewrite it to describe the functions that getnameinfo(3) is intended to replace.
Thkanks for the report Peter. So, it seems here were a confused references in both getnameinfo() and getaddrinfo(). I applied the following patch. --- a/man3/getaddrinfo.3 +++ b/man3/getaddrinfo.3 @@ -91,7 +91,7 @@ function combines the functionality provided by the .\" .BR getipnodebyaddr (3), .BR getservbyname (3) and -.BR getservbyport (3) +.BR getservbyname (3) functions into a single interface, but unlike the latter functions, .BR getaddrinfo () is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies. diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3 index f1001cd..5bafd76 100644 --- a/man3/getnameinfo.3 +++ b/man3/getnameinfo.3 @@ -38,7 +38,7 @@ It combines the functionality of and .BR getservbyport (3), but unlike those functions, -.BR getaddrinfo (3) +.BR getnameinfo (3) is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies. @@ -111,7 +111,7 @@ cannot be determined.) If set, then the numeric form of the service address is returned. (When not set, this will still happen in case the service's name cannot be determined.) -.SS "Extensions to getaddrinfo() for Internationalized Domain Names" +.SS "Extensions to getnameinfo() for Internationalized Domain Names" .PP Starting with glibc 2.3.4, .BR getnameinfo ()