erofs-utils: fuse: fix compile error with older libfuse versions
PATCH 1/1 erofs-utils: fuse: fix compile error with older libfuse versions
Fixes a43529e6c912 ("erofs-utils: fuse: kernel caching for readdir")
Signed-off-by Gao Xiang <[email protected]>
--- configure.ac | 5 +++++ fuse/main.c | 4 ++++ 2 files changed, 9 insertions(+)
configure.ac +5 -0
@@ -403,6 +403,11 @@ AS_IF([test "x$enable_fuse" != "xno"], [ have_fuse="yes" ], [have_fuse="no"]) ]) + AC_CHECK_MEMBERS([struct fuse_file_info.cache_readdir, struct fuse_file_info.keep_cache], + [], [], [[ +#include <fuse.h> + ]]) + LIBS="${saved_LIBS}" CPPFLAGS="${saved_CPPFLAGS}"], [have_fuse="no"])
fuse/main.c +4 -0
@@ -301,8 +301,12 @@ static void erofsfuse_opendir(fuse_req_t req, fuse_ino_t ino, } fi->fh = (uint64_t )vi; +#ifdef HAVE_STRUCT_FUSE_FILE_INFO_CACHE_READDIR fi->cache_readdir =1 ; +#endif +#ifdef HAVE_STRUCT_FUSE_FILE_INFO_KEEP_CACHE fi->keep_cache =1 ; +#endif fuse_reply_open (req, fi);return ;
Signature · 1 line
2.43.5