blob: 81ab29f3be16128318d57cd79b89a62ac641e930 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 1b5b6f827ac1153a41fc93e78bf34ccdf5720b9b Mon Sep 17 00:00:00 2001
2From: Randy MacLeod <Randy.MacLeod@windriver.com>
3Date: Fri, 19 Oct 2018 10:31:12 -0400
4Subject: [PATCH] Guard against __GLIBC_PREREQ for musl libc
5
Brad Bishop19323692019-04-05 15:28:33 -04006Upstream-Status: Submitted https://bugs.kde.org/show_bug.cgi?id=400162
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08007
8Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
9---
10 memcheck/tests/linux/sys-statx.c | 5 +++++
11 1 file changed, 5 insertions(+)
12
13diff --git a/memcheck/tests/linux/sys-statx.c b/memcheck/tests/linux/sys-statx.c
14index fe9f9ba45..473c2cd7f 100644
15--- a/memcheck/tests/linux/sys-statx.c
16+++ b/memcheck/tests/linux/sys-statx.c
17@@ -7,11 +7,16 @@
18 #include <assert.h>
19 #include <string.h>
20 #include <sys/syscall.h>
21+
22+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
23 #if __GLIBC_PREREQ(2,28)
24 /* struct statx provided in sys/stat.h */
25 #else
26 #include <linux/stat.h>
27 #endif
28+#else
29+#include <linux/stat.h>
30+#endif
31 #include <errno.h>
32
33 int check_stat2;
34--
352.17.0
36