[LTP] [PATCH] syscalls/statx06.c: Fix compiler errors

Xiao Yang yangx.jy@cn.fujitsu.com
Wed Nov 21 02:39:50 CET 2018


struct statx and statx_timestamp are only defined in sys/stat.h when
_GNU_SOURCE is defined, so statx06.c should define _GNU_SOURCE as m4
struct check does.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 testcases/kernel/syscalls/statx/statx06.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/syscalls/statx/statx06.c b/testcases/kernel/syscalls/statx/statx06.c
index dbf34a8..5240224 100644
--- a/testcases/kernel/syscalls/statx/statx06.c
+++ b/testcases/kernel/syscalls/statx/statx06.c
@@ -33,6 +33,7 @@
  *
  */
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <sys/mount.h>
 #include <time.h>
-- 
1.8.3.1





More information about the ltp mailing list