aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
Diffstat (limited to 'executor')
-rw-r--r--executor/common_linux.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 2a1d14e2b..53684f646 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -1734,10 +1734,22 @@ static int do_sandbox_namespace(void)
#if SYZ_EXECUTOR || SYZ_REPEAT && SYZ_USE_TMP_DIR
#include <dirent.h>
#include <errno.h>
-#include <linux/fs.h>
#include <string.h>
+#include <sys/ioctl.h>
#include <sys/mount.h>
+// This should be in <linux/fs.h> but is not there on some distros/arches as expected.
+struct fsxattr {
+ uint32 fsx_xflags;
+ uint32 fsx_extsize;
+ uint32 fsx_nextents;
+ uint32 fsx_projid;
+ uint32 fsx_cowextsize;
+ char fsx_pad[8];
+};
+
+#define FS_IOC_FSSETXATTR _IOW('X', 32, struct fsxattr)
+
// One does not simply remove a directory.
// There can be mounts, so we need to try to umount.
// Moreover, a mount can be mounted several times, so we need to try to umount in a loop.