Skip to content

Commit

Permalink
support older libfuse without utime_omit_ok flag
Browse files Browse the repository at this point in the history
  • Loading branch information
trapexit committed Apr 11, 2017
1 parent 1a1fa06 commit 8b976ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -53,6 +53,7 @@ $(error "FUSE development package doesn't appear available")
endif

FLAG_NOPATH = $(shell $(CPPFIND) "flag_nopath")
FLAG_UTIME = $(shell $(CPPFIND) "flag_utime_omit_ok")
FALLOCATE = $(shell $(CPPFIND) "fuse_fs_fallocate")
FLOCK = $(shell $(CPPFIND) "fuse_fs_flock")
READ_BUF = $(shell $(CPPFIND) "fuse_fs_read_buf")
Expand All @@ -74,6 +75,7 @@ CFLAGS = -g -Wall \
-DFUSE_USE_VERSION=29 \
-MMD \
-DFLAG_NOPATH=$(FLAG_NOPATH) \
-DFLAG_UTIME=$(FLAG_UTIME) \
-DFALLOCATE=$(FALLOCATE) \
-DFLOCK=$(FLOCK) \
-DREAD_BUF=$(READ_BUF) \
Expand Down
4 changes: 3 additions & 1 deletion src/mergerfs.cpp
Expand Up @@ -71,11 +71,13 @@ namespace local
get_fuse_operations(struct fuse_operations &ops,
const bool direct_io)
{
ops.flag_nullpath_ok = false;
#if FLAG_NOPATH
ops.flag_nopath = false;
#endif
ops.flag_nullpath_ok = false;
#if FLAG_UTIME
ops.flag_utime_omit_ok = true;
#endif

ops.access = mergerfs::fuse::access;
ops.bmap = NULL;
Expand Down

0 comments on commit 8b976ab

Please sign in to comment.