Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 1b5b6f827ac1153a41fc93e78bf34ccdf5720b9b Mon Sep 17 00:00:00 2001 |
| 2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> |
| 3 | Date: Fri, 19 Oct 2018 10:31:12 -0400 |
| 4 | Subject: [PATCH] Guard against __GLIBC_PREREQ for musl libc |
| 5 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 6 | Upstream-Status: Submitted https://bugs.kde.org/show_bug.cgi?id=400162 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 7 | |
| 8 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> |
| 9 | --- |
| 10 | memcheck/tests/linux/sys-statx.c | 5 +++++ |
| 11 | 1 file changed, 5 insertions(+) |
| 12 | |
| 13 | diff --git a/memcheck/tests/linux/sys-statx.c b/memcheck/tests/linux/sys-statx.c |
| 14 | index 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 | -- |
| 35 | 2.17.0 |
| 36 | |