Skip to content

Bump libc to 0.2.171 to use sigaction for AIX #109

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

Merged
merged 1 commit into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might also want to bump libc to 0.2.171 in Cargo.toml, so people will not accidentally get older versions and fail to compile.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Changed as suggested, thanks!

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 @@ -13,7 +13,7 @@ edition = "2021"
rust-version = "1.63"

[target.'cfg(unix)'.dependencies]
libc = "0.2.87"
libc = "0.2.171"

[target.'cfg(unix)'.dev-dependencies]
nix = { version = "0.28.0", features = ["fs"] }
Expand Down
9 changes: 1 addition & 8 deletions src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,7 @@ pub(crate) fn spawn_helper(
let mut err = None;
USR1_INIT.call_once(|| unsafe {
let mut new: libc::sigaction = mem::zeroed();
#[cfg(target_os = "aix")]
{
new.sa_union.__su_sigaction = sigusr1_handler;
}
#[cfg(not(target_os = "aix"))]
{
new.sa_sigaction = sigusr1_handler as usize;
}
new.sa_sigaction = sigusr1_handler as usize;
new.sa_flags = libc::SA_SIGINFO as _;
if libc::sigaction(libc::SIGUSR1, &new, ptr::null_mut()) != 0 {
err = Some(io::Error::last_os_error());
Expand Down
Loading