diff --git a/include/fuse-lite/fuse.h b/include/fuse-lite/fuse.h index 473caed3..16c4ea9c 100644 --- a/include/fuse-lite/fuse.h +++ b/include/fuse-lite/fuse.h @@ -68,8 +68,6 @@ typedef int (*fuse_fill_dir_t) (void *buf, const char *name, * Previously, paths were limited to a length of PATH_MAX. */ -#define HAS_UTIME_OMIT_OK 1 - struct fuse_operations { /** Get file attributes. * diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index ebbbac88..0bb89075 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -3459,8 +3459,13 @@ static void ntfs_fuse_destroy2(void *unused __attribute__((unused))) } static struct fuse_operations ntfs_3g_ops = { -#if defined(HAVE_UTIMENSAT) && defined(HAS_UTIME_OMIT_OK) - .flag_utime_omit_ok = 1, /* accept UTIME_NOW and UTIME_OMIT in utimens */ +#if defined(HAVE_UTIMENSAT) && (defined(FUSE_INTERNAL) || (FUSE_VERSION > 28)) + /* + * Accept UTIME_NOW and UTIME_OMIT in utimens, when + * using internal fuse or a fuse version since 2.9 + * (this field is not present in older versions) + */ + .flag_utime_omit_ok = 1, #endif .getattr = ntfs_fuse_getattr, .readlink = ntfs_fuse_readlink,