From: Philippe Waroquiers Date: Sun, 12 Aug 2018 11:27:38 +0000 (+0200) Subject: Make sys-statx.c test compile with glibc >= 2.28 X-Git-Tag: VALGRIND_3_14_0~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fe4ff55cce4c62f17262f2cf30b97b23af142b4;p=thirdparty%2Fvalgrind.git 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 --- 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;