diff --git a/CHANGELOG.md b/CHANGELOG.md index c64d2e9..dd74d81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # cicada Release Notes +## 1.0.2 - 2024.09.29 + +- Revert 1.0.1 to support `armv7-unknown-linux-gnueabihf`. + ## 1.0.1 - 2024.09.29 - update version of cicada in the lock file. diff --git a/Cargo.lock b/Cargo.lock index 38195e9..2a4f76b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -102,7 +102,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "cicada" -version = "1.0.1" +version = "1.0.2" dependencies = [ "clap 4.5.18", "errno 0.3.9", diff --git a/Cargo.toml b/Cargo.toml index 1a06cd4..3aec2d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ edition = "2021" build = "src/build.rs" name = "cicada" -version = "1.0.1" +version = "1.0.2" authors = ["Hugo Wang "] description = "A simple Bash-like Unix shell." diff --git a/src/builtins/ulimit.rs b/src/builtins/ulimit.rs index 456364d..d528e10 100644 --- a/src/builtins/ulimit.rs +++ b/src/builtins/ulimit.rs @@ -77,11 +77,17 @@ fn set_limit(limit_name: &str, value: u64, for_hard: bool) -> String { } } - // to make Raspbian GNU/Linux 10 armv7l work + // to support armv7-unknown-linux-gnueabihf if for_hard { - rlp.rlim_max = value; + #[cfg(target_pointer_width = "32")] + { rlp.rlim_max = value as u32; } + #[cfg(target_pointer_width = "64")] + { rlp.rlim_max = value; } } else { - rlp.rlim_cur = value; + #[cfg(target_pointer_width = "32")] + { rlp.rlim_cur = value as u32; } + #[cfg(target_pointer_width = "64")] + { rlp.rlim_cur = value; } } unsafe {