From 91ee45b0e172d2cc75b600505b6fefe9ecb01bd5 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Mon, 15 Sep 2025 19:19:39 +0000 Subject: [PATCH] path.rs: 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` For more information about this error, try `rustc --explain E0308`. error: could not compile `fish` (lib) due to 2 previous errors --- src/path.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/path.rs b/src/path.rs index 55cb6b4d9..59081ed20 100644 --- a/src/path.rs +++ b/src/path.rs @@ -695,7 +695,7 @@ pub fn path_remoteness(path: &wstr) -> DirRemoteness { #[cfg(not(any(target_os = "linux", cygwin)))] { 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,