From 17a0470620d8031c82bff3f45a7688a06bd77fdd Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 8 Aug 2018 17:04:50 +0200 Subject: executor: manually define struct fsxattr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It should be in but is not there on some distros/arches as expected. Travis build fails with: : In function ‘remove_dir’: :152:13: error: variable ‘attr’ has initializer but incomplete type :152:13: error: excess elements in struct initializer [-Werror] :152:13: error: (near initialization for ‘attr’) [-Werror] :152:21: error: storage size of ‘attr’ isn’t known :153:20: error: ‘FS_IOC_FSSETXATTR’ undeclared (first use in this function) :153:20: note: each undeclared identifier is reported only once for each function it appears in :152:21: error: unused variable ‘attr’ [-Werror=unused-variable] cc1: all warnings being treated as errors https://travis-ci.org/google/syzkaller/jobs/413574080 --- executor/common_linux.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'executor') 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 #include -#include #include +#include #include +// This should be in 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. -- cgit mrf-deployment