Comments
Patch
@@ -390,7 +390,13 @@ static int handle_utimensat(FsContext *ctx, V9fsPath *fs_path,
if (fd < 0) {
return fd;
}
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 6
+ /* futimens is only available with glibc 2.6 and above.*/
ret = futimens(fd, buf);
+#else
+ ret = -1;
+ errno = ENOSYS;
+#endif
close(fd);
return ret;
}
@@ -591,8 +597,16 @@ static int handle_init(FsContext *ctx)
int ret, mnt_id;
struct statfs stbuf;
struct file_handle fh;
- struct handle_data *data = g_malloc(sizeof(struct handle_data));
+ struct handle_data *data;
+#if __GLIBC__ <= 2 && __GLIBC_MINOR__ < 6
+ /*
+ * We support only above glibc 2.6. Older distro will anyhow
+ * not have handle syscall support in the kernel.
+ */
+ return -1;
+#endif
+ data = g_malloc(sizeof(struct handle_data));
data->mountfd = open(ctx->fs_root, O_DIRECTORY);
if (data->mountfd < 0) {
ret = data->mountfd;