Browse Source

support older libfuse without utime_omit_ok flag

pull/397/head
Antonio SJ Musumeci 8 years ago
parent
commit
8b976ab3c1
  1. 2
      Makefile
  2. 4
      src/mergerfs.cpp

2
Makefile

@ -53,6 +53,7 @@ $(error "FUSE development package doesn't appear available")
endif endif
FLAG_NOPATH = $(shell $(CPPFIND) "flag_nopath") FLAG_NOPATH = $(shell $(CPPFIND) "flag_nopath")
FLAG_UTIME = $(shell $(CPPFIND) "flag_utime_omit_ok")
FALLOCATE = $(shell $(CPPFIND) "fuse_fs_fallocate") FALLOCATE = $(shell $(CPPFIND) "fuse_fs_fallocate")
FLOCK = $(shell $(CPPFIND) "fuse_fs_flock") FLOCK = $(shell $(CPPFIND) "fuse_fs_flock")
READ_BUF = $(shell $(CPPFIND) "fuse_fs_read_buf") READ_BUF = $(shell $(CPPFIND) "fuse_fs_read_buf")
@ -74,6 +75,7 @@ CFLAGS = -g -Wall \
-DFUSE_USE_VERSION=29 \ -DFUSE_USE_VERSION=29 \
-MMD \ -MMD \
-DFLAG_NOPATH=$(FLAG_NOPATH) \ -DFLAG_NOPATH=$(FLAG_NOPATH) \
-DFLAG_UTIME=$(FLAG_UTIME) \
-DFALLOCATE=$(FALLOCATE) \ -DFALLOCATE=$(FALLOCATE) \
-DFLOCK=$(FLOCK) \ -DFLOCK=$(FLOCK) \
-DREAD_BUF=$(READ_BUF) \ -DREAD_BUF=$(READ_BUF) \

4
src/mergerfs.cpp

@ -71,11 +71,13 @@ namespace local
get_fuse_operations(struct fuse_operations &ops, get_fuse_operations(struct fuse_operations &ops,
const bool direct_io) const bool direct_io)
{ {
ops.flag_nullpath_ok = false;
#if FLAG_NOPATH #if FLAG_NOPATH
ops.flag_nopath = false; ops.flag_nopath = false;
#endif #endif
ops.flag_nullpath_ok = false;
#if FLAG_UTIME
ops.flag_utime_omit_ok = true; ops.flag_utime_omit_ok = true;
#endif
ops.access = mergerfs::fuse::access; ops.access = mergerfs::fuse::access;
ops.bmap = NULL; ops.bmap = NULL;

Loading…
Cancel
Save