-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
bump(main/fish): 4.0.0 #22609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump(main/fish): 4.0.0 #22609
Conversation
This probably needs some work for Android. For example, the first error was fixed in libc 0.2.165 version https://github.com/rust-lang/libc/releases/tag/0.2.165 |
We're probably not going to wanna package the beta release anyway, this is just intended for testing. |
Assigning myself as I use the fish shell, so will try to test this out |
Push access for maintainers is enabled on this PR. |
Rust's libc has no support for The integer conversion errors also seem to be Rust libc bugs:
|
and stat64.st_mode This bug was noticed in termux/termux-packages#22609
Looks like fish 4.0.0 is officially released. |
Looks like the 32 Bit builds are failing now. |
It doesn't find the rust compiler anymore and I have no idea why. I added some patch cleanup between builds so you can do repeat builds. Applying patch: Cargo.toml.patch
Downloading https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-x86_64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 52.4M 100 52.4M 0 0 5693k 0 0:00:09 0:00:09 --:--:-- 5451k
Downloading https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 120k 100 120k 0 0 166k 0 --:--:-- --:--:-- --:--:-- 166k
Archive: /home/builder/.termux-build/fish/tmp/ninja-1.12.1.zip
inflating: /home/builder/.termux-build/_cache/ninja-1.12.1/ninja
-- Android: Targeting API '24' with architecture 'arm64', ABI 'arm64-v8a', and processor 'aarch64'
-- The C compiler identification is Clang 18.0.3
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/builder/.termux-build/_cache/android-r27c-api-24-v1/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Trying to use PCRE2 from the system
CMake Warning at cmake/FindRust.cmake:31 (message):
`rustc` not found in PATH or `/home/builder/.cargo/bin`.
Hint: Check if `rustc` is in PATH or manually specify the location by
setting `Rust_COMPILER` to the path to `rustc`.
Call Stack (most recent call first):
cmake/FindRust.cmake:246 (_findrust_failed)
cmake/Rust.cmake:5 (include)
CMakeLists.txt:28 (include)
CMake Error at cmake/FindRust.cmake:29 (message):
`rustc` not found in PATH or `/home/builder/.cargo/bin`.
Hint: Check if `rustc` is in PATH or manually specify the location by
setting `Rust_COMPILER` to the path to `rustc`.
Call Stack (most recent call first):
cmake/FindRust.cmake:246 (_findrust_failed)
cmake/Rust.cmake:6 (find_package)
CMakeLists.txt:28 (include)
-- Configuring incomplete, errors occurred! |
This makes the error go away if you cherry pick it and place it into the folder with the other patches. |
that's odd, that didn't happen for me locally. i'll try again |
Why is it building |
that could have happened because of |
I didn't force push that backport up. |
Anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to add ino_t
and off_t
to this patch as well I think?
I don't have a good understanding of Rust unfortunately so I can only guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thunder-coding if you have the time it would be much appreciated if you could have another look at this.
Seeing as it's your patch and the upstream PR is also authored by you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happened because the patch failed to apply during the termux_step_pre_configure()
because something inside the version of the rust libc binding crate that enters the $CARGO_HOME/registry/src/*/libc
folder changed a little bit, but only for one of the files that seemed to only be compiled during the 32-bit builds.
The patch just needed to be rebased, I did that like this and it built successfully for all architectures.
diff --git a/packages/fish/libc-src-unix-linux_like-android.diff b/packages/fish/libc-src-unix-linux_like-android.diff
index ac873e2831..4c99bb7b92 100644
--- a/packages/fish/libc-src-unix-linux_like-android.diff
+++ b/packages/fish/libc-src-unix-linux_like-android.diff
@@ -139,13 +139,13 @@ Subject: [PATCH 2/2] fix more incompatible integer types
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/unix/linux_like/android/b32/mod.rs b/src/unix/linux_like/android/b32/mod.rs
-index d132cbaa2590..f7534c241cb5 100644
+index 34010bb..53e2f76 100644
--- a/src/unix/linux_like/android/b32/mod.rs
+++ b/src/unix/linux_like/android/b32/mod.rs
-@@ -5,7 +5,9 @@ use crate::prelude::*;
+@@ -3,7 +3,9 @@ use crate::prelude::*;
+ // The following definitions are correct for arm and i686,
+ // but may be wrong for mips
- pub type c_long = i32;
- pub type c_ulong = u32;
-pub type mode_t = u16;
+pub type mode_t = c_ushort;
+pub type ino_t = u64;
It seems like the upstream PR has been put on hold, and unfortunately I don't know a lot of Rust either only the basics, so I probably can't make a PR for this they would approve either, but I think it can safely be assumed that at some point in the future a very skilled Rust developer will wonder why their own app can't build for Android and fix it, then that fix will hopefully propagate to a future Rust libc binding crate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the patch didn't apply why didn't the build stop there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I Frankedstein-ed @thunder-coding's patch into applying on top of rust-lang/libc@0.2.170
.
It builds on 32 bit now, but I'm gonna need someone to please verify that on-device before I'm ready to declare it a victory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomJo2000 Yes this package works on device including on my 32-bit device, and I can confirm it appears to be behaving normally and seems to fully work when the appropriate build of the Termux APK is used,
and additionally, the "5u
" printing problem + buggy input does go away, only when I use a build I compiled of the Termux APK containing the PR to fix that:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(adding additional comment here so that other people reading this thread can get links to the updated information without confusion)
Unfortunately, at the time of this conversation, I did not test mkdir -p test1/test2/test3
followed by cd test1
followed by ls *
on the 32-bit device, so that resulted in
and I also had not yet created
so I did not, at that time, yet have the necessary experience to understand how to create
May as well mark this ready for review since it seems to build for all arches now. |
How do we actually wanna clean this up? |
In my opinion, because it is all in one package and all of the changes are required to build, and it doesn't build at individual commits in the series, it would be a good idea to squash into 1 commit, and add the description of everything into a long commit message in the commit, but we might want to hear from others since recently I was told to split a large commit into 3 separate commits in a different PR and have done so. |
I think we happen to have 1 commit that happens to have to do 3 things.
But neither of them is really independent from the other two. |
9db8948
to
7dd34cc
Compare
To recap the dicussion from the discord. Reconverting to draft until we have this worked out. |
Ok, I am sorry for the delay. I was debugging Fish. fish -c "uname -a"
fish -c "/system/bin/ls"
fish -c "ls" Here is the patch: --- a/build.rs
+++ b/build.rs
@@ -96,7 +96,9 @@ fn detect_cfgs(target: &mut Target) {
Ok(target.has_symbol("localeconv_l"))
}),
("FISH_USE_POSIX_SPAWN", &|target| {
- Ok(target.has_header("spawn.h"))
+ // the command 'fish -c "uname"', and most other uses of fish's -c argument,
+ // are not working if this is enabled.
+ Ok(false)
}),
("HAVE_PIPE2", &|target| {
Ok(target.has_symbol("pipe2")) Here is some information I have been able to obtain by debugging the behavior of this Fish package. There is a function This is where the problem is happening, or at least a point where it's not difficult to divert the codepath away from the place where the problem is happening. There are two possible codepaths in this function. One of them is the Because my patch uses the preprocessor-like cargo macro I do not know exactly whether the true root cause of the problem is a misbehavior on the Fish side of the posix-spawn-related code, or the |
I believe that since there was an unexpected problem, it might be a good idea for others to test this workaround before this is merged to make sure that it is able to completely solve the problem, and also look for any other problems or possibly better solutions. |
Works on my device. |
- build ctermid - add custom libc crate patch for 32bit android builds - backport FindRust.cmake rustup fix This backports: fish-shell/fish-shell@b38551d Co-authored-by: Jia Yuan Lo <jylo06g@gmail.com> Co-authored-by: Yaksh Bariya <yakshbari4@gmail.com> Co-authored-by: Robert Kirkman <misternumberone@live.com> Co-authored-by: AminurAlam <64137875+AminurAlam@users.noreply.github.com>
- Fixes termux#24741 - Cherry-pick fish-shell/fish-shell@bbf678e to replace `libc-src-unix-linux_like-android-mod.rs.diff` (since `libandroid-spawn` does not currently work with `fish`) - `libc-src-unix-linux_like-android.diff` is **causing** termux#24741 because of the problems explained by **maurer** in rust-lang/libc#4216 (comment) - I have rewritten `libc-src-unix-linux_like-android.diff` in **my own alternative way of solving [the errors](termux#22609 (comment) - My personal belief is that these errors should be solved by **patching `fish`**, _not_ by patching the **`libc` cargo crate**. - The reason I believe that is because **`fish` is using the type `libc::ino_t` to represent a value for storing the `d_ino` member of a `dirent` struct, which **cannot work on 32-bit Android** because 32-bit Android's `d_ino` is **not** an `ino_t`. [It is a `uint64_t`](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/dirent.h;l=64?q=d_ino&ss=android%2Fplatform%2Fsuperproject%2Fmain:bionic%2Flibc%2Finclude%2F&start=1). - Therefore, the logical conclusion is that any successful port of `fish` to 32-bit Android **must explicitly store the value of a `dirent` `d_ino` as a `u64` anywhere it appears in Rust code.** - The same concept applies to `st_mode` - `st_mode` of `stat` on 32-bit Android is **not** a `mode_t`. [It is an `unsigned int`](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/sys/stat.h;l=87), and [on Android, `unsigned int` is a 32-bit integer](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/stdint.h;l=42;drc=61197364367c9e404c7da6900658f1b16c42d0da;bpv=0;bpt=1?q=stdint.h&ss=android%2Fplatform%2Fsuperproject%2Fmain). Therefore, any successful port of `fish` to 32-bit Android must explicitly store the value of a `stat` `st_mode` as `u32`. - In C, `S_IFMT` is a pure typeless literal preprocessor definition, which is [`00170000` in Android](https://cs.android.com/android/kernel/superproject/+/common-android-mainline:common/include/uapi/linux/stat.h;l=9?q=S_IFMT), 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 Android - I previously read 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 - However, in April 2025, I [ported Steel Bank Common Lisp to 64-bit Android-x86](https://github.com/robertkirkman/termux-packages/blob/b54fa7f61e3c9acdfdc13b9680b9ff023d69323d/packages/sbcl/fix-stat-st_nlink-x86.patch). In the process of doing that, I became more experienced with Android's `stat.h` and `dirent.h` files, and I have been able to use that experience to successfully create what appears to be a correct solution to termux#24741 The original errors, repeated here for convenint reference by others: ``` error[E0308]: mismatched types --> src/wutil/dir_iter.rs:114:50 | 114 | self.typ.set(stat_mode_to_entry_type(s.st_mode)); | ----------------------- ^^^^^^^^^ expected `u16`, found `u32` | | | arguments to this function are incorrect | note: function defined here --> src/wutil/dir_iter.rs:151:4 | 151 | fn stat_mode_to_entry_type(m: libc::mode_t) -> Option<DirEntryType> { | ^^^^^^^^^^^^^^^^^^^^^^^ --------------- help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit | 114 | self.typ.set(stat_mode_to_entry_type(s.st_mode.try_into().unwrap())); | ++++++++++++++++++++ error[E0308]: mismatched types --> src/wutil/dir_iter.rs:292:32 | 292 | self.entry.inode = dent.d_ino; | ---------------- ^^^^^^^^^^ expected `u32`, found `u64` | | | expected due to the type of this binding ```
- Fixes termux#24741 - Cherry-pick fish-shell/fish-shell@bbf678e to replace `libc-src-unix-linux_like-android-mod.rs.diff` (since `libandroid-spawn` does not currently work with `fish`) - `libc-src-unix-linux_like-android.diff` is **causing** termux#24741 because of the problems explained by **maurer** in rust-lang/libc#4216 (comment) - I have rewritten `libc-src-unix-linux_like-android.diff` in **my own alternative way of solving [the errors](termux#22609 (comment) - My personal belief is that these errors should be solved by **patching `fish`**, _not_ by patching the **`libc` cargo crate**. - The reason I believe that is because **`fish` is using the type `libc::ino_t` to represent a value for storing the `d_ino` member of a `dirent` struct, which **cannot work on 32-bit Android** because 32-bit Android's `d_ino` is **not** an `ino_t`. [It is a `uint64_t`](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/dirent.h;l=64?q=d_ino&ss=android%2Fplatform%2Fsuperproject%2Fmain:bionic%2Flibc%2Finclude%2F&start=1). - Therefore, the logical conclusion is that any successful port of `fish` to 32-bit Android **must explicitly store the value of a `dirent` `d_ino` as a `u64` anywhere it appears in Rust code.** - The same concept applies to `st_mode` - `st_mode` of `stat` on 32-bit Android is **not** a `mode_t`. [It is an `unsigned int`](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/sys/stat.h;l=87), and [on Android, `unsigned int` is a 32-bit integer](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/stdint.h;l=42;drc=61197364367c9e404c7da6900658f1b16c42d0da;bpv=0;bpt=1?q=stdint.h&ss=android%2Fplatform%2Fsuperproject%2Fmain). Therefore, any successful port of `fish` to 32-bit Android must explicitly store the value of a `stat` `st_mode` as `u32`. - In C, `S_IFMT` is a pure typeless literal preprocessor definition, which is [`00170000` in Android](https://cs.android.com/android/kernel/superproject/+/common-android-mainline:common/include/uapi/linux/stat.h;l=9?q=S_IFMT), 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 Android - I previously read 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 - However, in April 2025, I [ported Steel Bank Common Lisp to 64-bit Android-x86](https://github.com/robertkirkman/termux-packages/blob/b54fa7f61e3c9acdfdc13b9680b9ff023d69323d/packages/sbcl/fix-stat-st_nlink-x86.patch). In the process of doing that, I became more experienced with Android's `stat.h` and `dirent.h` files, and I have been able to use that experience to successfully create what appears to be a correct solution to termux#24741 The original errors, repeated here for convenint reference by others: ``` error[E0308]: mismatched types --> src/wutil/dir_iter.rs:114:50 | 114 | self.typ.set(stat_mode_to_entry_type(s.st_mode)); | ----------------------- ^^^^^^^^^ expected `u16`, found `u32` | | | arguments to this function are incorrect | note: function defined here --> src/wutil/dir_iter.rs:151:4 | 151 | fn stat_mode_to_entry_type(m: libc::mode_t) -> Option<DirEntryType> { | ^^^^^^^^^^^^^^^^^^^^^^^ --------------- help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit | 114 | self.typ.set(stat_mode_to_entry_type(s.st_mode.try_into().unwrap())); | ++++++++++++++++++++ error[E0308]: mismatched types --> src/wutil/dir_iter.rs:292:32 | 292 | self.entry.inode = dent.d_ino; | ---------------- ^^^^^^^^^^ expected `u32`, found `u64` | | | expected due to the type of this binding ```
- Fixes #24741 - Cherry-pick fish-shell/fish-shell@bbf678e to replace `libc-src-unix-linux_like-android-mod.rs.diff` (since `libandroid-spawn` does not currently work with `fish`) - `libc-src-unix-linux_like-android.diff` is **causing** #24741 because of the problems explained by **maurer** in rust-lang/libc#4216 (comment) - I have rewritten `libc-src-unix-linux_like-android.diff` in **my own alternative way of solving [the errors](#22609 (comment) - My personal belief is that these errors should be solved by **patching `fish`**, _not_ by patching the **`libc` cargo crate**. - The reason I believe that is because **`fish` is using the type `libc::ino_t` to represent a value for storing the `d_ino` member of a `dirent` struct, which **cannot work on 32-bit Android** because 32-bit Android's `d_ino` is **not** an `ino_t`. [It is a `uint64_t`](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/dirent.h;l=64?q=d_ino&ss=android%2Fplatform%2Fsuperproject%2Fmain:bionic%2Flibc%2Finclude%2F&start=1). - Therefore, the logical conclusion is that any successful port of `fish` to 32-bit Android **must explicitly store the value of a `dirent` `d_ino` as a `u64` anywhere it appears in Rust code.** - The same concept applies to `st_mode` - `st_mode` of `stat` on 32-bit Android is **not** a `mode_t`. [It is an `unsigned int`](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/sys/stat.h;l=87), and [on Android, `unsigned int` is a 32-bit integer](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/stdint.h;l=42;drc=61197364367c9e404c7da6900658f1b16c42d0da;bpv=0;bpt=1?q=stdint.h&ss=android%2Fplatform%2Fsuperproject%2Fmain). Therefore, any successful port of `fish` to 32-bit Android must explicitly store the value of a `stat` `st_mode` as `u32`. - In C, `S_IFMT` is a pure typeless literal preprocessor definition, which is [`00170000` in Android](https://cs.android.com/android/kernel/superproject/+/common-android-mainline:common/include/uapi/linux/stat.h;l=9?q=S_IFMT), 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 Android - I previously read 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 - However, in April 2025, I [ported Steel Bank Common Lisp to 64-bit Android-x86](https://github.com/robertkirkman/termux-packages/blob/b54fa7f61e3c9acdfdc13b9680b9ff023d69323d/packages/sbcl/fix-stat-st_nlink-x86.patch). In the process of doing that, I became more experienced with Android's `stat.h` and `dirent.h` files, and I have been able to use that experience to successfully create what appears to be a correct solution to #24741 The original errors, repeated here for convenint reference by others: ``` error[E0308]: mismatched types --> src/wutil/dir_iter.rs:114:50 | 114 | self.typ.set(stat_mode_to_entry_type(s.st_mode)); | ----------------------- ^^^^^^^^^ expected `u16`, found `u32` | | | arguments to this function are incorrect | note: function defined here --> src/wutil/dir_iter.rs:151:4 | 151 | fn stat_mode_to_entry_type(m: libc::mode_t) -> Option<DirEntryType> { | ^^^^^^^^^^^^^^^^^^^^^^^ --------------- help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit | 114 | self.typ.set(stat_mode_to_entry_type(s.st_mode.try_into().unwrap())); | ++++++++++++++++++++ error[E0308]: mismatched types --> src/wutil/dir_iter.rs:292:32 | 292 | self.entry.inode = dent.d_ino; | ---------------- ^^^^^^^^^^ expected `u32`, found `u64` | | | expected due to the type of this binding ```
- Fixes termux/termux-packages#24741 - Cherry-pick fish-shell/fish-shell@bbf678e to replace `libc-src-unix-linux_like-android-mod.rs.diff` (since `libandroid-spawn` does not currently work with `fish`) - `libc-src-unix-linux_like-android.diff` is **causing** termux/termux-packages#24741 because of the problems explained by **maurer** in rust-lang/libc#4216 (comment) - I have rewritten `libc-src-unix-linux_like-android.diff` in **my own alternative way of solving [the errors](termux/termux-packages#22609 (comment) - My personal belief is that these errors should be solved by **patching `fish`**, _not_ by patching the **`libc` cargo crate**. - The reason I believe that is because **`fish` is using the type `libc::ino_t` to represent a value for storing the `d_ino` member of a `dirent` struct, which **cannot work on 32-bit Android** because 32-bit Android's `d_ino` is **not** an `ino_t`. [It is a `uint64_t`](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/dirent.h;l=64?q=d_ino&ss=android%2Fplatform%2Fsuperproject%2Fmain:bionic%2Flibc%2Finclude%2F&start=1). - Therefore, the logical conclusion is that any successful port of `fish` to 32-bit Android **must explicitly store the value of a `dirent` `d_ino` as a `u64` anywhere it appears in Rust code.** - The same concept applies to `st_mode` - `st_mode` of `stat` on 32-bit Android is **not** a `mode_t`. [It is an `unsigned int`](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/sys/stat.h;l=87), and [on Android, `unsigned int` is a 32-bit integer](https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/stdint.h;l=42;drc=61197364367c9e404c7da6900658f1b16c42d0da;bpv=0;bpt=1?q=stdint.h&ss=android%2Fplatform%2Fsuperproject%2Fmain). Therefore, any successful port of `fish` to 32-bit Android must explicitly store the value of a `stat` `st_mode` as `u32`. - In C, `S_IFMT` is a pure typeless literal preprocessor definition, which is [`00170000` in Android](https://cs.android.com/android/kernel/superproject/+/common-android-mainline:common/include/uapi/linux/stat.h;l=9?q=S_IFMT), 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 Android - I previously read 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 - However, in April 2025, I [ported Steel Bank Common Lisp to 64-bit Android-x86](https://github.com/robertkirkman/termux-packages/blob/b54fa7f61e3c9acdfdc13b9680b9ff023d69323d/packages/sbcl/fix-stat-st_nlink-x86.patch). In the process of doing that, I became more experienced with Android's `stat.h` and `dirent.h` files, and I have been able to use that experience to successfully create what appears to be a correct solution to termux/termux-packages#24741 The original errors, repeated here for convenint reference by others: ``` error[E0308]: mismatched types --> src/wutil/dir_iter.rs:114:50 | 114 | self.typ.set(stat_mode_to_entry_type(s.st_mode)); | ----------------------- ^^^^^^^^^ expected `u16`, found `u32` | | | arguments to this function are incorrect | note: function defined here --> src/wutil/dir_iter.rs:151:4 | 151 | fn stat_mode_to_entry_type(m: libc::mode_t) -> Option<DirEntryType> { | ^^^^^^^^^^^^^^^^^^^^^^^ --------------- help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit | 114 | self.typ.set(stat_mode_to_entry_type(s.st_mode.try_into().unwrap())); | ++++++++++++++++++++ error[E0308]: mismatched types --> src/wutil/dir_iter.rs:292:32 | 292 | self.entry.inode = dent.d_ino; | ---------------- ^^^^^^^^^^ expected `u32`, found `u64` | | | expected due to the type of this binding ```
This PR is intended for build testing.DO NOT MERGE.
Fish 4.0 transitions the project to Rust.
Meaning we gotta write new patches.
CC: @AminurAlam