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.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/editors/zed/files/patch-crates_fs_src_fs.rs b/editors/zed/files/patch-crates_fs_src_fs.rs
new file mode 100644
index 000000000000..6e1826cf7b49
--- /dev/null
+++ b/editors/zed/files/patch-crates_fs_src_fs.rs
@@ -0,0 +1,14 @@
+--- crates/fs/src/fs.rs.orig 2025-11-15 04:52:04 UTC
++++ crates/fs/src/fs.rs
+@@ -309,7 +309,10 @@ impl FileHandle for std::fs::File {
+
+ let fd = self.as_fd();
+ let mut kif = MaybeUninit::<libc::kinfo_file>::uninit();
+- kif.kf_structsize = libc::KINFO_FILE_SIZE;
++ unsafe {
++ std::ptr::write_bytes(kif.as_mut_ptr(), 0, 1);
++ (*kif.as_mut_ptr()).kf_structsize = libc::KINFO_FILE_SIZE;
++ }
+
+ let result = unsafe { libc::fcntl(fd.as_raw_fd(), libc::F_KINFO, kif.as_mut_ptr()) };
+ if result == -1 {