Repository navigation
path.rs: fix build on ARM / POWER on FreeBSD - #11804
Merged
Merged
Conversation
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`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `fish` (lib) due to 2 previous errors
Contributor
|
thanks, merging
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Many architectures, e.g. ARM or POWER use unsigned char by default.
TODOs: