Re: [patch] getnameinfo.3: Fix _POSIX_C_SOURCE value for getaddrinfo()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sebastian,

On 11/22/20 11:37 PM, Sebastian Kirmayer wrote:
> The minimum value of _POSIX_C_SOURCE for getnameinfo() was mistyped as 201112L
> (not a real POSIX version), it should be 200112L. This is the same typo that
> was fixed for getaddrinfo.3 in commit 94db8ae1824ada8561c3dbbbed88a8a9175c4886
> 
> According to the current documentation, this file should not compile, but
> it does:
> 
>     #define _POSIX_C_SOURCE 200112L
>     #include <netdb.h>
>     int (*mygetnameinfo)() = getnameinfo;
> 
> (If _POSIX_C_SOURCE is changed to 200111L, the program does no longer compile.)
> 
> man3/getnameinfo.3:
> 
> @@ -27,7 +27,7 @@ Feature Test Macro Requirements for glibc (see
>  .RE
>  .PP
>  .BR getnameinfo ():
> -    Since glibc 2.22: _POSIX_C_SOURCE >= 201112L
> +    Since glibc 2.22: _POSIX_C_SOURCE >= 200112L
>      Glibc 2.21 and earlier: _POSIX_C_SOURCE
>  .ad b
>  .SH DESCRIPTION

Thanks for taking the time to report, but I think you must be looking
at a rather old version of the manual pages. It looks like that typo
was fixed about three years ago in the Git tree!

Thanks,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux