[PATCH] tests: Include linux/stat.h
Dmitry V. Levin
ldv at altlinux.org
Sat Aug 4 20:33:13 UTC 2018
On Sat, Aug 04, 2018 at 01:20:10PM -0700, Khem Raj wrote:
> Starting with glibc 2.28, sys/stat.h header will have the
s/will have/has/ as glibc 2.28 has already been released.
In fact, starting with glibc commit glibc-2.28~105.
> definition for struct statx, in which case including linux/stat.h should be
> avoided, in order to prevent a duplicate definition.
Why linux/stat.h should be avoided in the test?
Have you tried the latest HEAD from strace.git?
In particular, what do you think about commit v4.23-37-g3dbffb7?
> Signed-off-by: Khem Raj <raj.khem at gmail.com>
> tests-m32/statx.c | 7 +++++++
> tests-mx32/statx.c | 8 +++++++-
> tests/statx.c | 8 +++++++-
> 3 files changed, 21 insertions(+), 2 deletions(-)
tests-m32 and tests-mx32 are copies, no need to touch them.
In strace.git you can see that
$ grep tests .gitignore
I wonder what kind of git repository are you working with?
> diff --git a/tests/statx.c b/tests/statx.c
> index 816b7eb..e9f9993 100644
> --- a/tests/statx.c
> +++ b/tests/statx.c
> @@ -30,7 +30,13 @@
> #ifdef __NR_statx
> -# include <linux/stat.h>
> +# if defined(__GLIBC__)
> +# if !__GLIBC_PREREQ(2,28)
Are you absolutely sure that every glibc that provides __GLIBC__ macro
also provides __GLIBC_PREREQ? I bet __GLIBC_PREREQ is not for public use.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: not available
More information about the Strace-devel