From 7fe4ff55cce4c62f17262f2cf30b97b23af142b4 Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Sun, 12 Aug 2018 13:27:38 +0200 Subject: [PATCH] Make sys-statx.c test compile with glibc >= 2.28 Newer glibc >= 2.28 provides a wrapper (and struct definitions) for statx. So, only include linux/stat.h on older glibc. This fixes a build failure on (at least) fedora 29 with glibc 2.28 --- memcheck/tests/linux/sys-statx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/memcheck/tests/linux/sys-statx.c b/memcheck/tests/linux/sys-statx.c index 7b6ee34d53..fe9f9ba451 100644 --- a/memcheck/tests/linux/sys-statx.c +++ b/memcheck/tests/linux/sys-statx.c @@ -7,7 +7,11 @@ #include #include #include +#if __GLIBC_PREREQ(2,28) +/* struct statx provided in sys/stat.h */ +#else #include +#endif #include int check_stat2; -- 2.47.2