@@ -12,11 +12,8 @@
#include <sys/syscall.h>
#include <sys/types.h>
-#ifdef HAVE_LINUX_MOUNT_H
-# include <linux/mount.h>
-#endif
-
#include "lapi/fcntl.h"
+#include "lapi/mount.h"
#include "lapi/syscalls.h"
#ifndef HAVE_FSOPEN
@@ -18,14 +18,22 @@
*/
#define _GNU_SOURCE
-#include <sys/mount.h>
#include <stdlib.h>
#include "tst_test.h"
-#include "lapi/fs.h"
#include "lapi/fsverity.h"
#include "lapi/stat.h"
+#include "lapi/mount.h"
#include <inttypes.h>
+/* define neded FS_* macros to avoid linux/fs.h conflict with sys/mount.h */
+#ifndef FS_IOC_GETFLAGS
+#define FS_IOC_GETFLAGS _IOR('f', 1, long)
+#endif
+
+#ifndef FS_VERITY_FL
+#define FS_VERITY_FL 0x00100000 /* Verity protected inode */
+#endif
+
#define MNTPOINT "mnt_point"
#define TESTFILE_FLAGGED MNTPOINT"/test_file1"
#define TESTFILE_UNFLAGGED MNTPOINT"/test_file2"
glibc 2.36 mount.h is conflicting with linux/mount.h [1] which is included by linux/fs.h via lapi/fs.h, as a compromize define needed macros from linux/fs.h and avoid the conflict [1] https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E Signed-off-by: Khem Raj <raj.khem@gmail.com> --- include/lapi/fsmount.h | 5 +---- testcases/kernel/syscalls/statx/statx09.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 6 deletions(-)