@@ -599,7 +599,8 @@ static int handle_unlinkat(FsContext *ctx, V9fsPath *dir,
static int handle_ioc_getversion(FsContext *ctx, V9fsPath *path,
mode_t st_mode, uint64_t *st_gen)
{
- int err;
+ int err = -ENOTTY;
+#ifdef FS_IOC_GETVERSION
V9fsFidOpenState fid_open;
/*
@@ -615,6 +616,7 @@ static int handle_ioc_getversion(FsContext *ctx, V9fsPath *path,
}
err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen);
handle_close(ctx, &fid_open);
+#endif
return err;
}
@@ -630,6 +632,7 @@ static int handle_init(FsContext *ctx)
ret = data->mountfd;
goto err_out;
}
+#ifdef FS_IOC_GETVERSION
ret = statfs(ctx->fs_root, &stbuf);
if (!ret) {
switch (stbuf.f_type) {
@@ -641,6 +644,7 @@ static int handle_init(FsContext *ctx)
break;
}
}
+#endif
memset(&fh, 0, sizeof(struct file_handle));
ret = name_to_handle(data->mountfd, ".", &fh, &mnt_id, 0);
if (ret && errno == EOVERFLOW) {