fix(main/fish): do not patch rust-lang/libc cargo crate
#24759
Merged
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.
Fixes [Bug]: fish shell file globbing not working #24741
Cherry-pick fish-shell/fish-shell@bbf678e to replace
libc-src-unix-linux_like-android-mod.rs.diff(sincelibandroid-spawndoes not currently work withfish)libc-src-unix-linux_like-android.diffis causing [Bug]: fish shell file globbing not working #24741 because of the problems explained by maurer in android: use proper types for dirent.d_ino, dirent.d_off, stat.st_mode and stat64.st_mode rust-lang/libc#4216 (comment)I have rewritten
libc-src-unix-linux_like-android.diffin my own alternative way of solving the errorsfish, not by patching thelibccargo crate.fishis using the typelibc::ino_tto represent a value for storing thed_inomember of adirentstruct, which cannot work on 32-bit Android because 32-bit Android'sd_inois not anino_t. It is auint64_t.fishto 32-bit Android must explicitly store the value of adirentd_inoas au64anywhere it appears in Rust code.st_mode-st_modeofstaton 32-bit Android is not amode_t. It is anunsigned int, and on Android,unsigned intis a 32-bit integer. Therefore, any successful port offishto 32-bit Android must explicitly store the value of astatst_modeasu32.S_IFMTis a pure typeless literal preprocessor definition, which is (octal)00170000in Android, preprocessor definitions do not really exist in Rust so there is unfortunately no correct alternative to a hardcoded integer literal for this on 32-bit AndroidI previously read android: use proper types for dirent.d_ino, dirent.d_off, stat.st_mode and stat64.st_mode rust-lang/libc#4216 in January 2025, however, I unfortunately did not have the experience necessary at the time to fully understand how to solve this specific problem, so at the time, I did not change the version written by thunder-coding because I did not know how to make a better way to bypass the errors
stat.handdirent.hfiles, and I have been able to use that experience to successfully create what appears to be a correct solution to [Bug]: fish shell file globbing not working #24741The original errors, repeated here for convenient reference by others: