Skip to content

Enable statx on musl-libc #3976

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
Aug 10, 2025
Merged

Enable statx on musl-libc #3976

merged 1 commit into from
Aug 10, 2025

Conversation

neuschaefer
Copy link
Contributor

@neuschaefer neuschaefer commented Oct 16, 2024

Description

This PR adds the statx syscall on Linux/musl, which is available since musl 1.2.5.

Closes: #3972

This PR is currently blocked by #3791 and #3978.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • 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

@rustbot
Copy link
Collaborator

rustbot commented Oct 16, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@tgross35
Copy link
Contributor

tgross35 commented Nov 6, 2024

@rustbot blocked

@rustbot rustbot added the O-unix label Nov 19, 2024
@neuschaefer neuschaefer force-pushed the statx branch 4 times, most recently from c6ed9b3 to 93a3c59 Compare November 24, 2024 01:48
@bors
Copy link
Contributor

bors commented Nov 27, 2024

☔ The latest upstream changes (presumably #4132) made this pull request unmergeable. Please resolve the merge conflicts.

@tgross35
Copy link
Contributor

tgross35 commented Jul 3, 2025

We now have the config musl_v1_2_3 that you could gate this under

Version 1.2.5 of musl-libc added support for the statx system call[1].

[1]: https://musl.libc.org/releases.html
pub stx_atomic_write_unit_max: crate::__u32,
pub stx_atomic_write_segments_max: crate::__u32,
__statx_pad2: [crate::__u32; 1],
__statx_pad3: [crate::__u64; 9],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm dropping the new constant for now, as they seem likely to cause more headaches

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.

Sorry I missed this, looks great!

@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Aug 10, 2025
@tgross35 tgross35 added this pull request to the merge queue Aug 10, 2025
Merged via the queue into rust-lang:main with commit ef3c046 Aug 10, 2025
49 of 52 checks passed
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 11, 2025
Version 1.2.5 of musl-libc added support for the statx system call[1].

[1]: https://musl.libc.org/releases.html

(backport <rust-lang#3976>)
(cherry picked from commit ef3c046)
@tgross35 tgross35 mentioned this pull request Aug 11, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 11, 2025
Version 1.2.5 of musl-libc added support for the statx system call[1].

[1]: https://musl.libc.org/releases.html

(backport <rust-lang#3976>)
(cherry picked from commit ef3c046)
github-merge-queue bot pushed a commit that referenced this pull request Aug 11, 2025
Version 1.2.5 of musl-libc added support for the statx system call[1].

[1]: https://musl.libc.org/releases.html

(backport <#3976>)
(cherry picked from commit ef3c046)
@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 Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-android O-gnu O-linux O-linux-like O-unix S-waiting-on-ci 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.

statx using the musl libc
5 participants