Skip to content

statfs: Fix definitions for s390x musl with libc 0.2.176#2678

Merged
SteveLauC merged 1 commit intonix-rust:masterfrom
Gelbpunkt:s390x-musl-libc-0-2-176
Feb 1, 2026
Merged

statfs: Fix definitions for s390x musl with libc 0.2.176#2678
SteveLauC merged 1 commit intonix-rust:masterfrom
Gelbpunkt:s390x-musl-libc-0-2-176

Conversation

@Gelbpunkt
Copy link
Copy Markdown
Contributor

What does this PR do

This PR fixes compilation against libc 0.2.176 on s390x-unknown-linux-musl. libc 0.2.176 fixed the definitions of statfs to align them with musl, see rust-lang/libc#4549 for the PR that fixed it.

I'm not sure why libc is currently pinned to 0.2.175, but I tested this locally against 0.2.176 on s390x-unknown-linux-gnu and s390x-unknown-linux-musl and the statfs code compiles fine for both now.

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@neuschaefer
Copy link
Copy Markdown

What does this PR do

This PR fixes compilation against libc 0.2.176 on s390x-unknown-linux-musl. libc 0.2.176 fixed the definitions of statfs to align them with musl, see rust-lang/libc#4549 for the PR that fixed it.

I'm not sure why libc is currently pinned to 0.2.175, but I tested this locally against 0.2.176 on s390x-unknown-linux-gnu and s390x-unknown-linux-musl and the statfs code compiles fine for both now.

The PR description (at least the first paragraph) might be worth having in the git history (i.e. in the commit message)

@Kladki
Copy link
Copy Markdown

Kladki commented Oct 23, 2025

Closes #2683

@sertonix
Copy link
Copy Markdown

Is there anything blocking this MR?

@omnivagant
Copy link
Copy Markdown

it would be really nice to get this in so that we don't have to do things like https://git.alpinelinux.org/aports/commit/?id=19c85d09fa13f75669dc464c4dc14484eb0df6ee

@sertonix
Copy link
Copy Markdown

@SteveLauC Could you take a look at this, please?

@SteveLauC SteveLauC force-pushed the s390x-musl-libc-0-2-176 branch from fd18ec2 to afb2034 Compare February 1, 2026 04:02
@SteveLauC
Copy link
Copy Markdown
Member

I just rebased your branch to re-run CI, since I couldn’t find the re-run button for the previous run, it was too old.

This PR fixes compilation against libc 0.2.176 on s390x-unknown-linux-musl.
libc 0.2.176 fixed the definitions of statfs to align them with musl, see
rust-lang/libc#4549 for the PR that fixed it.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
@SteveLauC SteveLauC force-pushed the s390x-musl-libc-0-2-176 branch from afb2034 to 50c8793 Compare February 1, 2026 04:26
@SteveLauC
Copy link
Copy Markdown
Member

The PR description (at least the first paragraph) might be worth having in the git history (i.e. in the commit message)

Nix doesn’t include the PR description in the commit message, so I manually ran git commit --amend to include it.

@SteveLauC SteveLauC enabled auto-merge February 1, 2026 04:28
@SteveLauC SteveLauC linked an issue Feb 1, 2026 that may be closed by this pull request
@SteveLauC SteveLauC added this pull request to the merge queue Feb 1, 2026
Merged via the queue into nix-rust:master with commit 6619d8d Feb 1, 2026
44 checks passed
@sertonix
Copy link
Copy Markdown

sertonix commented Feb 1, 2026

Thanks!

@omnivagant
Copy link
Copy Markdown

is there a patch release with this anytime soon?

evanpurkhiser added a commit to evanpurkhiser/hddfancontrol that referenced this pull request Mar 7, 2026
nix 0.30.1 fails to build on s390x due to a type mismatch in statfs
field definitions (u32 vs u64). This was fixed in nix 0.31.0 via
upstream PR nix-rust/nix#2678.

Fixes: nix-rust/nix#2683
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.

Build failure with 0.30.1 on s390x

7 participants