]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make sys-statx.c test compile with glibc >= 2.28
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 12 Aug 2018 11:27:38 +0000 (13:27 +0200)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 12 Aug 2018 11:28:50 +0000 (13:28 +0200)
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

index 7b6ee34d5345f0d54289a37a7be9115c21715e3c..fe9f9ba4518e724071cbd616af8c065d8b322815 100644 (file)
@@ -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;