git: 0ec771a40199 - main - shells/fish: fix build on ARM / POWER
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Sep 2025 20:03:20 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0ec771a40199b9fc4fd671c5c64360ad6d4328fe
commit 0ec771a40199b9fc4fd671c5c64360ad6d4328fe
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-09-15 19:24:13 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-09-15 20:00:00 +0000
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<StatFS, Flags>(
| ^^^^^^^^^^^^^^^^^^^^^
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(+)
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<StatFS, Flags>(
+- 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,