From 1de26282a260a40a80308af48031e72f6d12b9f2 Mon Sep 17 00:00:00 2001 From: James Sanderson Date: Sun, 23 Oct 2016 02:13:25 +0100 Subject: [PATCH 1/4] Fix namespacing errors Such as: src/fs_base_utimensat.hpp:34:12: error: no member named 'utimensat' in the global namespace --- src/fs_base_fsync.hpp | 2 +- src/fs_base_utimensat.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fs_base_fsync.hpp b/src/fs_base_fsync.hpp index 53dfcd40..051da350 100644 --- a/src/fs_base_fsync.hpp +++ b/src/fs_base_fsync.hpp @@ -33,6 +33,6 @@ namespace fs int fdatasync(const int fd) { - return ::fdatasync(fd); + return fs::fdatasync(fd); } } diff --git a/src/fs_base_utimensat.hpp b/src/fs_base_utimensat.hpp index fe49e3ee..5df5bba3 100644 --- a/src/fs_base_utimensat.hpp +++ b/src/fs_base_utimensat.hpp @@ -31,7 +31,7 @@ namespace fs const struct timespec times[2], const int flags) { - return ::utimensat(dirfd,path.c_str(),times,flags); + return fs::utimensat(dirfd,path.c_str(),times,flags); } static From cecd8c7dc7752d663a1928dec32804d591937627 Mon Sep 17 00:00:00 2001 From: James Sanderson Date: Sun, 23 Oct 2016 02:14:45 +0100 Subject: [PATCH 2/4] Remove unsupported flags O_LARGEFILE and O_NOATIME src/fs_clonefile.cpp:199:34: error: use of undeclared identifier 'O_LARGEFILE' const int flags = O_CREAT|O_LARGEFILE|O_NOATIME|O_NOFOLLOW|O_TRUNC|O_WRONLY; ^ src/fs_clonefile.cpp:199:46: error: use of undeclared identifier 'O_NOATIME' const int flags = O_CREAT|O_LARGEFILE|O_NOATIME|O_NOFOLLOW|O_TRUNC|O_WRONLY; --- src/fs_clonefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs_clonefile.cpp b/src/fs_clonefile.cpp index b8bac932..cba9f220 100644 --- a/src/fs_clonefile.cpp +++ b/src/fs_clonefile.cpp @@ -196,7 +196,7 @@ namespace fs if(fdin == -1) return -1; - const int flags = O_CREAT|O_LARGEFILE|O_NOATIME|O_NOFOLLOW|O_TRUNC|O_WRONLY; + const int flags = O_CREAT|O_NOFOLLOW|O_TRUNC|O_WRONLY; const mode_t mode = S_IWUSR; fdout = fs::open(out,flags,mode); if(fdout == -1) From 52d91402e2d3c7212ce9155305f84b42688490f2 Mon Sep 17 00:00:00 2001 From: James Sanderson Date: Sun, 23 Oct 2016 02:15:55 +0100 Subject: [PATCH 3/4] Fix install commands install invocation spits out usage info and errors --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cbc7d5dd..086c74e4 100644 --- a/Makefile +++ b/Makefile @@ -143,14 +143,14 @@ distclean: clean install: install-base install-mount.mergerfs install-man install-base: $(TARGET) - $(INSTALL) -v -m 0755 -D "$(TARGET)" "$(INSTALLBINDIR)/$(TARGET)" + $(INSTALL) -v -m 0755 "$(TARGET)" "$(INSTALLBINDIR)/$(TARGET)" install-mount.mergerfs: mount.mergerfs $(MKDIR) -p "$(INSTALLBINDIR)" $(CP) -a "$<" "$(INSTALLBINDIR)/$<" install-man: $(MANPAGE) - $(INSTALL) -v -m 0644 -D "man/$(MANPAGE)" "$(INSTALLMAN1DIR)/$(MANPAGE)" + $(INSTALL) -v -m 0644 "man/$(MANPAGE)" "$(INSTALLMAN1DIR)/$(MANPAGE)" install-strip: install-base $(STRIP) "$(INSTALLBINDIR)/$(TARGET)" From 2f3d532cdb4d86c54fba1cea566ef89f11909519 Mon Sep 17 00:00:00 2001 From: James Sanderson Date: Sun, 30 Oct 2016 14:21:02 +0000 Subject: [PATCH 4/4] Prevent clang from crashing --- tools/cppfind | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cppfind b/tools/cppfind index c833ce9d..a1e14b9a 100755 --- a/tools/cppfind +++ b/tools/cppfind @@ -2,6 +2,6 @@ FUSE_CFLAGS="$(pkg-config --cflags fuse) -DFUSE_USE_VERSION=29" -echo "#include " | cpp ${FUSE_CFLAGS} | grep -q "${1}" +echo "#include " | cpp ${FUSE_CFLAGS} | grep "${1}" 2>&1 > /dev/null [ "$?" != "0" ]; echo $?