aboutsummaryrefslogtreecommitdiff
path: root/editors/zed/files/patch-crates_fs_src_fs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'editors/zed/files/patch-crates_fs_src_fs.rs')
-rw-r--r--editors/zed/files/patch-crates_fs_src_fs.rs25
1 files changed, 23 insertions, 2 deletions
diff --git a/editors/zed/files/patch-crates_fs_src_fs.rs b/editors/zed/files/patch-crates_fs_src_fs.rs
index 6e1826cf7b49..aee69dd1bc0b 100644
--- a/editors/zed/files/patch-crates_fs_src_fs.rs
+++ b/editors/zed/files/patch-crates_fs_src_fs.rs
@@ -1,6 +1,15 @@
---- crates/fs/src/fs.rs.orig 2025-11-15 04:52:04 UTC
+--- crates/fs/src/fs.rs.orig 2025-11-19 15:41:44 UTC
+++ crates/fs/src/fs.rs
-@@ -309,7 +309,10 @@ impl FileHandle for std::fs::File {
+@@ -356,7 +356,7 @@ impl FileHandle for std::fs::File {
+ Ok(new_path)
+ }
+
+- #[cfg(target_os = "freebsd")]
++ #[cfg(all(target_os = "freebsd", target_arch = "x86_64"))]
+ fn current_path(&self, _: &Arc<dyn Fs>) -> Result<PathBuf> {
+ use std::{
+ ffi::{CStr, OsStr},
+@@ -365,7 +365,10 @@ impl FileHandle for std::fs::File {
let fd = self.as_fd();
let mut kif = MaybeUninit::<libc::kinfo_file>::uninit();
@@ -12,3 +21,15 @@
let result = unsafe { libc::fcntl(fd.as_raw_fd(), libc::F_KINFO, kif.as_mut_ptr()) };
if result == -1 {
+@@ -376,6 +379,11 @@ impl FileHandle for std::fs::File {
+ let c_str = unsafe { CStr::from_ptr(kif.assume_init().kf_path.as_ptr()) };
+ let path = PathBuf::from(OsStr::from_bytes(c_str.to_bytes()));
+ Ok(path)
++ }
++
++ #[cfg(all(target_os = "freebsd", not(target_arch = "x86_64")))]
++ fn current_path(&self, _: &Arc<dyn Fs>) -> Result<PathBuf> {
++ anyhow::bail!("unimplemented")
+ }
+
+ #[cfg(target_os = "windows")]