From 807ee0f26c84bca1b40de9b7a7526116306d34fe Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Sat, 14 Mar 2015 11:11:43 +0100 Subject: [PATCH] Enable ioctl in ntfs-3g unconditionally when building with fuse-lite. fuse-lite announces a FUSE_VERSION which may not always match the exact capabilities of the library. Hence we add a special case for 'ioctl', which we know exists in fuse-lite regardless of the version number published. --- src/lowntfs-3g.c | 8 ++++---- src/ntfs-3g.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index 390c965b..3ff8b9de 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -2606,7 +2606,7 @@ static void ntfs_fuse_fsync(fuse_req_t req, fuse_reply_err(req, 0); } -#if FUSE_VERSION >= 28 +#if defined(FUSE_INTERNAL) || (FUSE_VERSION >= 28) static void ntfs_fuse_ioctl(fuse_req_t req __attribute__((unused)), fuse_ino_t ino __attribute__((unused)), int cmd, void *arg, @@ -2648,7 +2648,7 @@ fail : if (buf) free(buf); } -#endif /* FUSE_VERSION >= 28 */ +#endif /* defined(FUSE_INTERNAL) || (FUSE_VERSION >= 28) */ static void ntfs_fuse_bmap(fuse_req_t req, fuse_ino_t ino, size_t blocksize, uint64_t vidx) @@ -3600,9 +3600,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 +#if defined(FUSE_INTERNAL) || (FUSE_VERSION >= 28) .ioctl = ntfs_fuse_ioctl, -#endif /* FUSE_VERSION >= 28 */ +#endif /* defined(FUSE_INTERNAL) || (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 46cc1417..de0f920e 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -2446,7 +2446,7 @@ static int ntfs_fuse_fsync(const char *path __attribute__((unused)), return (ret); } -#if FUSE_VERSION >= 28 +#if defined(FUSE_INTERNAL) || (FUSE_VERSION >= 28) static int ntfs_fuse_ioctl(const char *path, int cmd, void *arg, struct fuse_file_info *fi __attribute__((unused)), @@ -2468,7 +2468,7 @@ static int ntfs_fuse_ioctl(const char *path, set_fuse_error(&ret); return ret; } -#endif /* FUSE_VERSION >= 28 */ +#endif /* defined(FUSE_INTERNAL) || (FUSE_VERSION >= 28) */ static int ntfs_fuse_bmap(const char *path, size_t blocksize, uint64_t *idx) { @@ -3421,9 +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 +#if defined(FUSE_INTERNAL) || (FUSE_VERSION >= 28) .ioctl = ntfs_fuse_ioctl, -#endif /* FUSE_VERSION >= 28 */ +#endif /* defined(FUSE_INTERNAL) || (FUSE_VERSION >= 28) */ #if !KERNELPERMS | (POSIXACLS & !KERNELACLS) .access = ntfs_fuse_access, .opendir = ntfs_fuse_opendir,