Skip to content

Bump libc to 0.2.171 to use sigaction for AIX #169

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 19, 2025

Conversation

xingxue-ibm
Copy link
Contributor

Change to use sa_sigaction instead of sa_union.__su_sigaction, now that the libc crate 0.2.171 implementation for AIX defines sa_sigaction as a direct member of struct sigaction, aligning it with implementations on other similar platforms. (rust-lang/libc#4250).

@vorner
Copy link
Owner

vorner commented Mar 22, 2025

Hello

The changes look nice. However, you update the libc only in Cargo.lock ‒ which is only internal (for development) and downstream crates don't take it into account at all. Can you also mandate the right minimal libc in Cargo.toml?

@xingxue-ibm
Copy link
Contributor Author

Hello

The changes look nice. However, you update the libc only in Cargo.lock ‒ which is only internal (for development) and downstream crates don't take it into account at all. Can you also mandate the right minimal libc in Cargo.toml?

Thanks for pointing this out! Changed Cargo.toml to mandate minimal libc version 0.2.171.

@xingxue-ibm
Copy link
Contributor Author

Gentle ping. We cannot build russh on AIX without the fix:

error[E0609]: no field `sa_union` on type `sigaction`
   --> /home/rust/dev/cargo/registry/src/index.crates.io-d11c229612889eed/signal-hook-registry-1.4.2/src/lib.rs:164:15
    |
164 |         { new.sa_union.__su_sigaction = handler; }
    |               ^^^^^^^^ unknown field
    |
    = note: available fields are: `sa_sigaction`, `sa_mask`, `sa_flags`

@daltenty
Copy link

daltenty commented Apr 8, 2025

LGTM from the AIX perspective

@xingxue-ibm
Copy link
Contributor Author

Gentle ping...

@vorner vorner merged commit 08720f1 into vorner:master Apr 19, 2025
13 of 38 checks passed
@vorner
Copy link
Owner

vorner commented Apr 19, 2025

Sorry for late response, too little time… Released as 1.4.3.

vorner added a commit that referenced this pull request Apr 19, 2025
* Do not list the libc minimal version on signal-hook, the aix change
  that prompted it is for signal-hook-registry.
* Do not force it for that one either. That would break our (arguably
  too conservative) minimal rust version. However, hint to the AIX user
  that upgrading their libc might be a good idea.
* Also mention in docs that to actually compile the crate on such an
  ancient version of rust, they need to keep libc old too.

See #169.
@xingxue-ibm
Copy link
Contributor Author

Sorry for late response, too little time… Released as 1.4.3.

No worries, thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants