Skip to contentSkip to conversation

syscalls/statx06.c: Fix compiler errors on old distros

PATCH New Xiao Yang 2 participants 2 messages Nov 20, 2018 – Nov 21, 2018

lore
Share & tools
lore

Xiao Yang

author
#0 lore raw

PATCH 1/1 syscalls/statx06.c: Fix compiler errors on old distros

Compilation fails on old distros due to undefined CLOCK_REALTIME_COARSE, AT_FDCWD or MS_STRICTATIME.

---
 testcases/kernel/syscalls/statx/statx06.c | 3 +++
 1 file changed, 3 insertions(+)
testcases/kernel/syscalls/statx/statx06.c +3 -0
index 17fccc8..1ce7d48 100644
@@ -36,6 +36,9 @@
 #include <stdio.h>
 #include "tst_test.h"
 #include "lapi/stat.h"
+#include "lapi/mount.h"
+#include "lapi/fcntl.h"
+#include "lapi/posix_clocks.h"
 #include "tst_safe_clocks.h"
 #include "tst_safe_macros.h"
 #include "tst_timer.h"
Signature · 1 line
1.7.11.rc0
#1 lore raw

PATCH 1/1 syscalls/statx06.c: Fix compiler errors on old distros

Hi!

testcases/kernel/syscalls/statx/statx06.c line 44

Quoted 12 lines
testcases/kernel/syscalls/statx/statx06.c +3 -0
@@ -36,6 +36,9 @@
 #include <stdio.h>
 #include "tst_test.h"
 #include "lapi/stat.h"
+#include "lapi/mount.h"
+#include "lapi/fcntl.h"
+#include "lapi/posix_clocks.h"
 #include "tst_safe_clocks.h"
 #include "tst_safe_macros.h"
 #include "tst_timer.h"

I had to move the lapi headers down so that they are included after the sys ones (especially sys/mount.h), othewrise the test would fail to compile if these definitions were present in the respective sys headers.

Pushed, thanks.

Signature · 2 lines
Cyril Hrubis
[email protected]