From 33d918f2acc68f2782d1fada8384aeadec57f3fe Mon Sep 17 00:00:00 2001 From: Iku Iwasa Date: Sat, 29 Apr 2023 11:20:27 +0900 Subject: [PATCH] Use 3 arguments listxattr() on non-macOS Unix In order to support *BSD especially. --- src/fs/xattr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs/xattr.rs b/src/fs/xattr.rs index d1cbb17c..d6ae4eff 100644 --- a/src/fs/xattr.rs +++ b/src/fs/xattr.rs @@ -30,7 +30,7 @@ unsafe fn has_xattrs(path: &Path) -> bool { slice_ptr.cast::() }; - #[cfg(target_os = "linux")] + #[cfg(not(target_os = "macos"))] return 0 < listxattr(path_ptr, ptr::null_mut::(), 0); #[cfg(target_os = "macos")]