|
From: Philippe W. <phi...@so...> - 2018-08-12 11:29:28
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7fe4ff55cce4c62f17262f2cf30b97b23af142b4 commit 7fe4ff55cce4c62f17262f2cf30b97b23af142b4 Author: Philippe Waroquiers <phi...@sk...> Date: Sun Aug 12 13:27:38 2018 +0200 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: --- 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 7b6ee34..fe9f9ba 100644 --- a/memcheck/tests/linux/sys-statx.c +++ b/memcheck/tests/linux/sys-statx.c @@ -7,7 +7,11 @@ #include <assert.h> #include <string.h> #include <sys/syscall.h> +#if __GLIBC_PREREQ(2,28) +/* struct statx provided in sys/stat.h */ +#else #include <linux/stat.h> +#endif #include <errno.h> int check_stat2; |