if libfuse.found()
conf.set10('HAVE_FUSE3', true)
conf.set('FUSE_USE_VERSION', 35)
+ if libfuse.version().version_compare('>=3.10.3')
+ conf.set10('HAVE_FUSE_RETURNS_DT_TYPE', true)
+ else
+ conf.set10('HAVE_FUSE_RETURNS_DT_TYPE', false)
+ endif
else
libfuse = dependency('fuse', version: '>= 2.6')
if libfuse.found()
conf.set10('HAVE_FUSE', true)
conf.set('FUSE_USE_VERSION', 26)
+ conf.set10('HAVE_FUSE_RETURNS_DT_TYPE', true)
endif
endif
void *lxcfs_fuse_init(struct fuse_conn_info *conn, void *data)
{
struct fuse_context *fc = fuse_get_context();
+#if HAVE_FUSE_RETURNS_DT_TYPE
can_use_sys_cpu = true;
+#endif
has_versioned_opts = true;
return fc->private_data;
}
int ret;
ret = fstatat(dirfd(dp), name, &st, AT_SYMLINK_NOFOLLOW);
- if (ret)
- return DIR_FILLER(filler, buf, name, NULL, off);
+ if (!ret)
+ return DIR_FILLER(filler, buf, name, &st, off);
- return DIR_FILLER(filler, buf, name, &st, off);
+ return DIR_FILLER(filler, buf, name, NULL, off);
}
#endif /* __LXCFS_FUSE_COMPAT_H */