* [LTP] [PATCH] syscalls/statx*: Fix compiler errors on old distros
2018-09-13 7:53 [LTP] [PATCH] syscalls/statx*: Fix compiler errors on old distros Xiao Yang
@ 2018-09-12 12:28 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2018-09-12 12:28 UTC (permalink / raw)
To: ltp
Hi!
I've rebased this to apply on the top of my statx05 fixes I've commited
recently and pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 2+ messages in thread
* [LTP] [PATCH] syscalls/statx*: Fix compiler errors on old distros
@ 2018-09-13 7:53 Xiao Yang
2018-09-12 12:28 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: Xiao Yang @ 2018-09-13 7:53 UTC (permalink / raw)
To: ltp
With glibc-2.5 on RHEL5, compilation failed because of undefined
AT_FDCWD, O_DIRECTORY or WEXITSTATUS().
1) Fix undefined AT_FDCWD and O_DIRECTORY by defining _GNU_SOURCE.
2) Fix undefined WEXITSTATUS() by including <sys/wait.h>.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
testcases/kernel/syscalls/statx/statx01.c | 2 ++
testcases/kernel/syscalls/statx/statx02.c | 1 +
testcases/kernel/syscalls/statx/statx03.c | 2 ++
testcases/kernel/syscalls/statx/statx04.c | 1 +
testcases/kernel/syscalls/statx/statx05.c | 3 +++
5 files changed, 9 insertions(+)
diff --git a/testcases/kernel/syscalls/statx/statx01.c b/testcases/kernel/syscalls/statx/statx01.c
index 574560b..23ea99b 100644
--- a/testcases/kernel/syscalls/statx/statx01.c
+++ b/testcases/kernel/syscalls/statx/statx01.c
@@ -33,6 +33,8 @@
* predefined values.
* Minimum kernel version required is 4.11.
*/
+
+#define _GNU_SOURCE
#include <stdio.h>
#include <sys/types.h>
#include <sys/sysmacros.h>
diff --git a/testcases/kernel/syscalls/statx/statx02.c b/testcases/kernel/syscalls/statx/statx02.c
index f21abf2..08ea940 100644
--- a/testcases/kernel/syscalls/statx/statx02.c
+++ b/testcases/kernel/syscalls/statx/statx02.c
@@ -22,6 +22,7 @@
* Minimum kernel version required is 4.11.
*/
+#define _GNU_SOURCE
#include <stdio.h>
#include <inttypes.h>
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/statx/statx03.c b/testcases/kernel/syscalls/statx/statx03.c
index 4dc1cd0..c72d7fe 100644
--- a/testcases/kernel/syscalls/statx/statx03.c
+++ b/testcases/kernel/syscalls/statx/statx03.c
@@ -26,6 +26,8 @@
*
* Minimum Kernel version required is 4.11.
*/
+
+#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/statx/statx04.c b/testcases/kernel/syscalls/statx/statx04.c
index f27cec7..8caf092 100644
--- a/testcases/kernel/syscalls/statx/statx04.c
+++ b/testcases/kernel/syscalls/statx/statx04.c
@@ -23,6 +23,7 @@
* Minimum kernel version required is 4.11.
*/
+#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/fs.h"
#include <stdlib.h>
diff --git a/testcases/kernel/syscalls/statx/statx05.c b/testcases/kernel/syscalls/statx/statx05.c
index 1a890cf..130e5bc 100644
--- a/testcases/kernel/syscalls/statx/statx05.c
+++ b/testcases/kernel/syscalls/statx/statx05.c
@@ -19,9 +19,12 @@
* Minimum kernel version required is 4.11.
*/
+#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/fs.h"
#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include "lapi/stat.h"
#define MOUNT_POINT "mnt_point"
--
1.7.11.rc0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-13 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-13 7:53 [LTP] [PATCH] syscalls/statx*: Fix compiler errors on old distros Xiao Yang
2018-09-12 12:28 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox