syscall/pivot_root01.c: Fix compile error
PATCH 1/1 syscall/pivot_root01.c: Fix compile error
1)The 'MS_REC' and 'MS_PRIVATE' flag are not defined on some old distros,
so add them into 'include/lapi/mount.h' to fix it.
2)Enclose macro with complex values in parentheses.
Signed-off-by Jinhui huang <[email protected]>
--- include/lapi/mount.h | 10 +++++++++- testcases/kernel/syscalls/pivot_root/pivot_root01.c | 1 + 2 files changed, 10 insertions(+), 1 deletion(-)
include/lapi/mount.h +9 -1
@@ -19,8 +19,16 @@#ifndef __MOUNT_H__#define __MOUNT_H__ +#ifndef MS_REC +#define MS_REC 16384 +#endif + +#ifndef MS_PRIVATE +#define MS_PRIVATE (1<<18) +#endif +#ifndef MS_STRICTATIME -#define MS_STRICTATIME 1 << 24 +#define MS_STRICTATIME (1 << 24)#endif #ifndef MNT_DETACH
testcases/kernel/syscalls/pivot_root/pivot_root01.c +1 -0
@@ -14,6 +14,7 @@#include <stdlib.h> #include "tst_test.h" +#include "lapi/mount.h" #ifdef HAVE_UNSHARE
Signature · 1 line
1.8.3.1
PATCH 1/1 syscall/pivot_root01.c: Fix compile error
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]