Skip to content

Commit

Permalink
support armv7-unknown-linux-gnueabihf
Browse files Browse the repository at this point in the history
  • Loading branch information
mitnk committed Sep 29, 2024
1 parent f4172e8 commit b035739
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
edition = "2021"
build = "src/build.rs"
name = "cicada"
version = "1.0.1"
version = "1.0.2"
authors = ["Hugo Wang <[email protected]>"]

description = "A simple Bash-like Unix shell."
Expand Down
12 changes: 9 additions & 3 deletions src/builtins/ulimit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b035739

Please sign in to comment.