From 903db231ec0078b9b4efab1ed20b6fb63d88eb18 Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Tue, 25 Aug 2020 11:29:42 +0300 Subject: [PATCH] Change default xattr access method to 'openxattr' for macOS builds. The namespaced way of accessing extended attributes doesn't make sense in macOS which doesn't use namespaces. --- src/ntfs-3g_common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ntfs-3g_common.c b/src/ntfs-3g_common.c index 397b72a0..6b24528b 100644 --- a/src/ntfs-3g_common.c +++ b/src/ntfs-3g_common.c @@ -427,7 +427,14 @@ char *parse_mount_options(ntfs_fuse_context_t *ctx, } break; case OPT_USER_XATTR : +#if defined(__APPLE__) || defined(__DARWIN__) + /* macOS builds use non-namespaced extended + * attributes by default since it matches the + * standard behaviour of macOS filesystems. */ + ctx->streams = NF_STREAMS_INTERFACE_OPENXATTR; +#else ctx->streams = NF_STREAMS_INTERFACE_XATTR; +#endif break; case OPT_NOAUTO : /* Don't pass noauto option to fuse. */ -- 2.11.0