From 3f5d881a7020e3f77680ba5aa1691bc1336682df Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Fri, 13 Mar 2015 08:57:38 +0100 Subject: [PATCH] Compile fix for FUSE versions earlier than 2.8.0. --- src/lowntfs-3g.c | 6 ++++++ src/ntfs-3g.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index b9ae4df0..6bf57593 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -588,7 +588,9 @@ static void ntfs_init(void *userdata __attribute__((unused)), >= SAFE_CAPACITY_FOR_BIG_WRITES)) conn->want |= FUSE_CAP_BIG_WRITES; #endif +#if FUSE_VERSION >= 28 conn->want |= FUSE_CAP_IOCTL_DIR; +#endif /* FUSE_VERSION >= 28 */ } static int ntfs_fuse_getstat(struct SECURITY_CONTEXT *scx, @@ -2604,6 +2606,7 @@ static void ntfs_fuse_fsync(fuse_req_t req, fuse_reply_err(req, 0); } +#if FUSE_VERSION >= 28 static void ntfs_fuse_ioctl(fuse_req_t req __attribute__((unused)), fuse_ino_t ino __attribute__((unused)), int cmd, void *arg, @@ -2645,6 +2648,7 @@ fail : if (buf) free(buf); } +#endif /* FUSE_VERSION >= 28 */ static void ntfs_fuse_bmap(fuse_req_t req, fuse_ino_t ino, size_t blocksize, uint64_t vidx) @@ -3597,7 +3601,9 @@ static struct fuse_lowlevel_ops ntfs_3g_ops = { .fsyncdir = ntfs_fuse_fsync, .bmap = ntfs_fuse_bmap, .destroy = ntfs_fuse_destroy2, +#if FUSE_VERSION >= 28 .ioctl = ntfs_fuse_ioctl, +#endif /* FUSE_VERSION >= 28 */ #if !KERNELPERMS | (POSIXACLS & !KERNELACLS) .access = ntfs_fuse_access, #endif diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index b04798dc..bb978459 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -657,7 +657,9 @@ static void *ntfs_init(struct fuse_conn_info *conn) >= SAFE_CAPACITY_FOR_BIG_WRITES)) conn->want |= FUSE_CAP_BIG_WRITES; #endif +#if FUSE_VERSION >= 28 conn->want |= FUSE_CAP_IOCTL_DIR; +#endif /* FUSE_VERSION >= 28 */ return NULL; } @@ -2444,6 +2446,7 @@ static int ntfs_fuse_fsync(const char *path __attribute__((unused)), return (ret); } +#if FUSE_VERSION >= 28 static int ntfs_fuse_ioctl(const char *path, int cmd, void *arg, struct fuse_file_info *fi __attribute__((unused)), @@ -2465,6 +2468,7 @@ static int ntfs_fuse_ioctl(const char *path, set_fuse_error(&ret); return ret; } +#endif /* FUSE_VERSION >= 28 */ static int ntfs_fuse_bmap(const char *path, size_t blocksize, uint64_t *idx) { @@ -3417,7 +3421,9 @@ static struct fuse_operations ntfs_3g_ops = { .fsyncdir = ntfs_fuse_fsync, .bmap = ntfs_fuse_bmap, .destroy = ntfs_fuse_destroy2, +#if FUSE_VERSION >= 28 .ioctl = ntfs_fuse_ioctl, +#endif /* FUSE_VERSION >= 28 */ #if !KERNELPERMS | (POSIXACLS & !KERNELACLS) .access = ntfs_fuse_access, .opendir = ntfs_fuse_opendir,