aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/generated.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-08-08 17:04:50 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-08-08 17:04:50 +0200
commit17a0470620d8031c82bff3f45a7688a06bd77fdd (patch)
tree5fded82afb16de5f808857e58363cfd819d2ed3d /pkg/csource/generated.go
parentd46deef51c0809429c414eea99566b82b6d5fbbf (diff)
executor: manually define struct fsxattr
It should be in <linux/fs.h> but is not there on some distros/arches as expected. Travis build fails with: <stdin>: In function ‘remove_dir’: <stdin>:152:13: error: variable ‘attr’ has initializer but incomplete type <stdin>:152:13: error: excess elements in struct initializer [-Werror] <stdin>:152:13: error: (near initialization for ‘attr’) [-Werror] <stdin>:152:21: error: storage size of ‘attr’ isn’t known <stdin>:153:20: error: ‘FS_IOC_FSSETXATTR’ undeclared (first use in this function) <stdin>:153:20: note: each undeclared identifier is reported only once for each function it appears in <stdin>:152:21: error: unused variable ‘attr’ [-Werror=unused-variable] cc1: all warnings being treated as errors https://travis-ci.org/google/syzkaller/jobs/413574080
Diffstat (limited to 'pkg/csource/generated.go')
-rw-r--r--pkg/csource/generated.go12
1 files changed, 11 insertions, 1 deletions
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 <dirent.h>
#include <errno.h>
-#include <linux/fs.h>
#include <string.h>
+#include <sys/ioctl.h>
#include <sys/mount.h>
+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;