summaryrefslogtreecommitdiff
path: root/sysutils/erdtree/files/patch-src_fs_xattr.rs
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2023-04-26 22:41:00 +0200
committerStefan Eßer <se@FreeBSD.org>2023-04-26 22:44:29 +0200
commitca7293f7c24df7fbdc5b7af4db53fa55538aaf05 (patch)
treec498e7d4caab514367dd7cbacd393f1e4a6d1277 /sysutils/erdtree/files/patch-src_fs_xattr.rs
parentdevel/py-pymsgbox: New port: Python module for JavaScript-like message boxes (diff)
sysutils/erdtree: new port - filesystem and disk-usage analysis tool
The extended attribute support is currently disabled.
Diffstat (limited to 'sysutils/erdtree/files/patch-src_fs_xattr.rs')
-rw-r--r--sysutils/erdtree/files/patch-src_fs_xattr.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/sysutils/erdtree/files/patch-src_fs_xattr.rs b/sysutils/erdtree/files/patch-src_fs_xattr.rs
new file mode 100644
index 000000000000..96d5fa2ce3ef
--- /dev/null
+++ b/sysutils/erdtree/files/patch-src_fs_xattr.rs
@@ -0,0 +1,21 @@
+--- src/fs/xattr.rs.orig 2023-04-26 05:18:54 UTC
++++ src/fs/xattr.rs
+@@ -22,17 +22,5 @@ unsafe fn has_xattrs(path: &Path) -> bool {
+ /// Checks to see if a directory entry referred to by `path` has extended attributes. If the file
+ /// at the provided `path` is symlink the file it points to is interrogated.
+ unsafe fn has_xattrs(path: &Path) -> bool {
+- use libc::{c_char, listxattr};
+-
+- let path_ptr = {
+- let slice = path.as_os_str().as_bytes();
+- let slice_ptr = slice.as_ptr();
+- slice_ptr.cast::<c_char>()
+- };
+-
+- #[cfg(target_os = "linux")]
+- return 0 < listxattr(path_ptr, ptr::null_mut::<c_char>(), 0);
+-
+- #[cfg(target_os = "macos")]
+- return 0 < listxattr(path_ptr, ptr::null_mut::<c_char>(), 0, 0);
++ return false;
+ }