Hi Jakub! On 6/9/22 00:43, Jakub Wilk wrote:
The original text hinted that you need _GNU_SOURCE only for a few of the AT_* constants; but actually you need it to get the statx() declaration. Signed-off-by: Jakub Wilk <jwilk@xxxxxxxxx>
Thanks for resending! I applied both patches. And in this one I added the following to the commit message:
[alx:] You can check yourself: $ grepc -tfp statx ./io/bits/statx-generic.h:60: int statx (int __dirfd, const char *__restrict __path, int __flags, unsigned int __mask, struct statx *__restrict __buf) __THROW __nonnull ((2, 5)); $ grep -rnC1 '<bits/statx-generic.h>' io/ io/bits/statx-generic.h-21-#ifndef _SYS_STAT_Hio/bits/statx-generic.h:22:# error Never include <bits/statx-generic.h> directly, include <sys/stat.h> instead.
io/bits/statx-generic.h-23-#endif -- io/bits/statx.h-25-/* Use the generic definitions. */ io/bits/statx.h:26:#include <bits/statx-generic.h> $ grep -rnC1 '<bits/statx.h>' io/ io/bits/statx.h-21-#ifndef _SYS_STAT_Hio/bits/statx.h:22:# error Never include <bits/statx.h> directly, include <sys/stat.h> instead.
io/bits/statx.h-23-#endif -- io/sys/stat.h-371-#ifdef __USE_GNU io/sys/stat.h:372:# include <bits/statx.h> io/sys/stat.h-373-#endif Cheers, Alex
--- man2/statx.2 | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/man2/statx.2 b/man2/statx.2 index 0b3f6747f..a8620be6f 100644 --- a/man2/statx.2 +++ b/man2/statx.2 @@ -15,6 +15,7 @@ Standard C library .RI ( libc ", " \-lc ) .SH SYNOPSIS .nf +.BR "#define _GNU_SOURCE " "/* See feature_test_macros(7) */" .BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */" .B #include <sys/stat.h> .PP @@ -166,11 +167,6 @@ If is .BR AT_FDCWD , the call operates on the current working directory. -.IP -This flag is Linux-specific; define -.B _GNU_SOURCE -.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed -to obtain its definition. .TP .B AT_NO_AUTOMOUNT Don't automount the terminal ("basename") component of @@ -193,11 +189,6 @@ and act as though .B AT_NO_AUTOMOUNT was set. -.IP -This flag is Linux-specific; define -.B _GNU_SOURCE -.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed -to obtain its definition. .TP .B AT_SYMLINK_NOFOLLOW If
-- Alejandro Colomar Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature