From 0ec771a40199b9fc4fd671c5c64360ad6d4328fe Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Mon, 15 Sep 2025 21:24:13 +0200 Subject: shells/fish: fix build on ARM / POWER error[E0308]: mismatched types --> src/path.rs:749:13 | 748 | let remoteness = remoteness_via_statfs( | --------------------- arguments to this function are incorrect 749 | libc::statfs, | ^^^^^^^^^^^^ expected fn pointer, found fn item | = note: expected fn pointer `unsafe extern "C" fn(*const i8, _) -> _` found fn item `unsafe extern "C" fn(*const u8, _) -> _ {libc::statfs}` note: function defined here --> src/path.rs:712:12 | 712 | fn remoteness_via_statfs( | ^^^^^^^^^^^^^^^^^^^^^ 713 | statfn: unsafe extern "C" fn(*const i8, *mut StatFS) -> libc::c_int, | ------------------------------------------------------------------- error[E0308]: mismatched types --> src/path.rs:725:34 | 725 | if unsafe { (statfn)(path.as_ptr(), buf.as_mut_ptr()) } < 0 { | -------- ^^^^^^^^^^^^^ expected `*const i8`, found `*const u8` | | | arguments to this function are incorrect | = note: expected raw pointer `*const i8` found raw pointer `*const u8` --- shells/fish/files/patch-src_path.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 shells/fish/files/patch-src_path.rs (limited to 'shells/fish/files/patch-src_path.rs') diff --git a/shells/fish/files/patch-src_path.rs b/shells/fish/files/patch-src_path.rs new file mode 100644 index 000000000000..01335107ef4e --- /dev/null +++ b/shells/fish/files/patch-src_path.rs @@ -0,0 +1,11 @@ +--- src/path.rs.orig 2025-09-15 19:16:57 UTC ++++ src/path.rs +@@ -710,7 +710,7 @@ fn path_remoteness(path: &wstr) -> DirRemoteness { + #[cfg(not(target_os = "linux"))] + { + fn remoteness_via_statfs( +- statfn: unsafe extern "C" fn(*const i8, *mut StatFS) -> libc::c_int, ++ statfn: unsafe extern "C" fn(*const libc::c_char, *mut StatFS) -> libc::c_int, + flagsfn: fn(&StatFS) -> Flags, + is_local_flag: u64, + path: &std::ffi::CStr, -- cgit v1.2.3