diff --git configure.ac configure.ac index 6f29378..e69e086 100644 --- configure.ac +++ configure.ac @@ -313,13 +313,13 @@ elif test "${with_fuse}" = "external"; then export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/lib/pkgconfig:/usr/lib/pkgconfig:/opt/gnome/lib/pkgconfig:/usr/share/pkgconfig:/usr/local/lib/pkgconfig:$prefix/lib/pkgconfig:/opt/gnome/share/pkgconfig:/usr/local/share/pkgconfig PKG_CHECK_MODULES( [FUSE_MODULE], - [fuse >= 2.6.0], + [fuse3 >= 2.6.0], , [ AC_MSG_ERROR([FUSE >= 2.6.0 was not found. Either older FUSE is still present, or FUSE is not fully installed (e.g. fuse, libfuse, libfuse2, libfuse-dev, etc packages). Source code: http://fuse.sf.net]) ] ) - FUSE_LIB_PATH=`$PKG_CONFIG --libs-only-L fuse | sed -e 's,/[/]*,/,g' -e 's,[ ]*$,,'` + FUSE_LIB_PATH=`$PKG_CONFIG --libs-only-L fuse3 | sed -e 's,/[/]*,/,g' -e 's,[ ]*$,,'` fi # Autodetect whether we can build crypto stuff or not. diff --git src/Makefile.am src/Makefile.am index 89ac5ce..3fdc64a 100644 --- src/Makefile.am +++ src/Makefile.am @@ -28,7 +28,7 @@ ntfs_3g_LDFLAGS = $(AM_LDFLAGS) -all-static endif ntfs_3g_CFLAGS = \ $(AM_CFLAGS) \ - -DFUSE_USE_VERSION=26 \ + -DFUSE_USE_VERSION=30 \ $(FUSE_CFLAGS) \ -I$(top_srcdir)/include/ntfs-3g ntfs_3g_SOURCES = ntfs-3g.c ntfs-3g_common.c @@ -39,7 +39,7 @@ lowntfs_3g_LDFLAGS = $(AM_LDFLAGS) -all-static endif lowntfs_3g_CFLAGS = \ $(AM_CFLAGS) \ - -DFUSE_USE_VERSION=26 \ + -DFUSE_USE_VERSION=30 \ $(FUSE_CFLAGS) \ -I$(top_srcdir)/include/ntfs-3g lowntfs_3g_SOURCES = lowntfs-3g.c ntfs-3g_common.c diff --git src/Makefile.in src/Makefile.in index ce94059..8232203 100644 --- src/Makefile.in +++ src/Makefile.in @@ -420,7 +420,7 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in @ENABLE_NTFS_3G_TRUE@@REALLYSTATIC_TRUE@ntfs_3g_LDFLAGS = $(AM_LDFLAGS) -all-static @ENABLE_NTFS_3G_TRUE@ntfs_3g_CFLAGS = \ @ENABLE_NTFS_3G_TRUE@ $(AM_CFLAGS) \ -@ENABLE_NTFS_3G_TRUE@ -DFUSE_USE_VERSION=26 \ +@ENABLE_NTFS_3G_TRUE@ -DFUSE_USE_VERSION=30 \ @ENABLE_NTFS_3G_TRUE@ $(FUSE_CFLAGS) \ @ENABLE_NTFS_3G_TRUE@ -I$(top_srcdir)/include/ntfs-3g @@ -429,7 +429,7 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in @ENABLE_NTFS_3G_TRUE@@REALLYSTATIC_TRUE@lowntfs_3g_LDFLAGS = $(AM_LDFLAGS) -all-static @ENABLE_NTFS_3G_TRUE@lowntfs_3g_CFLAGS = \ @ENABLE_NTFS_3G_TRUE@ $(AM_CFLAGS) \ -@ENABLE_NTFS_3G_TRUE@ -DFUSE_USE_VERSION=26 \ +@ENABLE_NTFS_3G_TRUE@ -DFUSE_USE_VERSION=30 \ @ENABLE_NTFS_3G_TRUE@ $(FUSE_CFLAGS) \ @ENABLE_NTFS_3G_TRUE@ -I$(top_srcdir)/include/ntfs-3g diff --git src/lowntfs-3g.c src/lowntfs-3g.c index 3ff8b9d..72cef77 100644 --- src/lowntfs-3g.c +++ src/lowntfs-3g.c @@ -591,6 +591,8 @@ static void ntfs_init(void *userdata __attribute__((unused)), #ifdef FUSE_CAP_IOCTL_DIR conn->want |= FUSE_CAP_IOCTL_DIR; #endif /* defined(FUSE_CAP_IOCTL_DIR) */ + + conn->want |= FUSE_CAP_ASYNC_DIO; } static int ntfs_fuse_getstat(struct SECURITY_CONTEXT *scx, @@ -2444,7 +2446,7 @@ static int ntfs_fuse_rename_existing_dest(fuse_req_t req, fuse_ino_t ino, static void ntfs_fuse_rename(fuse_req_t req, fuse_ino_t parent, const char *name, fuse_ino_t newparent, - const char *newname) + const char *newname, unsigned int flags) { int ret; fuse_ino_t ino; diff --git src/ntfs-3g.c src/ntfs-3g.c index de0f920..7b368dd 100644 --- src/ntfs-3g.c +++ src/ntfs-3g.c @@ -660,6 +660,8 @@ static void *ntfs_init(struct fuse_conn_info *conn) #ifdef FUSE_CAP_IOCTL_DIR conn->want |= FUSE_CAP_IOCTL_DIR; #endif /* defined(FUSE_CAP_IOCTL_DIR) */ + + conn->want |= FUSE_CAP_ASYNC_DIO; return NULL; } @@ -1080,7 +1082,11 @@ static int ntfs_fuse_filler(ntfs_fuse_fill_context_t *fill_ctx, } #endif /* defined(__APPLE__) || defined(__DARWIN__), ... */ - ret = fill_ctx->filler(fill_ctx->buf, filename, &st, 0); + ret = fill_ctx->filler(fill_ctx->buf, filename, &st, 0 +#if FUSE_MAJOR_VERSION >= 3 + , (0) +#endif + ); } free(filename); @@ -1134,7 +1140,11 @@ static int ntfs_fuse_opendir(const char *path, static int ntfs_fuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset __attribute__((unused)), - struct fuse_file_info *fi __attribute__((unused))) + struct fuse_file_info *fi __attribute__((unused)) +#if FUSE_MAJOR_VERSION >= 3 + , enum fuse_readdir_flags flags +#endif +) { ntfs_fuse_fill_context_t fill_ctx; ntfs_inode *ni; @@ -2207,7 +2217,7 @@ static int ntfs_fuse_rename_existing_dest(const char *old_path, const char *new_ return ret; } -static int ntfs_fuse_rename(const char *old_path, const char *new_path) +static int ntfs_fuse_rename(const char *old_path, const char *new_path, unsigned int flags) { int ret, stream_name_len; char *path = NULL;