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 --- pkg/csource/generated.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pkg/csource/generated.go') diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index c68c99cc2..5efa04780 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -3216,9 +3216,19 @@ static int do_sandbox_namespace(void) #if SYZ_EXECUTOR || SYZ_REPEAT && SYZ_USE_TMP_DIR #include #include -#include #include +#include #include +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) static void remove_dir(const char* dir) { DIR* dp; -- cgit mrf-deployment