Skip to content

Conversation

@neuschaefer
Copy link
Contributor

Description

Define signal-related structs according to musl-libc. These structs are already mentioned in libc-test/semver/linux-s390x.txt, so it makes sense to define the for musl, not just for glibc.

Sources

https://elixir.bootlin.com/musl/v1.2.5/source/arch/s390x/bits/signal.h

Checklist

  • Relevant tests in libc-test/semver have been updated no change
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI


pub struct fpregset_t {
pub fpc: u32,
__pad: u32,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see this padding in musl sources?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It isn't explicit, but the compiler ends up adding it anyway. Many other structs in libc are defined with explicit padding. I don't know the official policy (either way it should ideally be enforced in CI)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I can tell, padding fields are only used when they are also defined in the libc headers

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Thanks!

@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Oct 22, 2025
@tgross35 tgross35 added this pull request to the merge queue Oct 22, 2025
Merged via the queue into rust-lang:main with commit c7702ef Oct 22, 2025
51 of 52 checks passed
@neuschaefer neuschaefer deleted the s390x-mctx branch October 22, 2025 08:27
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Nov 3, 2025
@tgross35 tgross35 mentioned this pull request Nov 3, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Nov 3, 2025
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-linux O-musl O-unix stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants