Enable statx on supported musl versions#154981
Enable statx on supported musl versions#154981strophy wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
r? @jhpratt rustbot has assigned @jhpratt. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Failed to set assignee to
|
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
| #[cfg(all(target_os = "linux", target_env = "gnu"))] | ||
| #[cfg(target_os = "linux")] | ||
| use crate::sys::weak::syscall; |
There was a problem hiding this comment.
This still doesn't seem quite right. Why are we using weak linkage and dynamic detection when we know the version of musl we link?
There was a problem hiding this comment.
Some discussion about this pattern here #t-libs > Problems with `syscall!`
Rust has feature-gated fs statx calls to gnu libc only. This feature was added to musl libc in the 1.2.5 release, which was in turn included in Rust 1.93.0, see #142682
There is a stale feature gate that is still blocking access to statx calls, even though this is now available in musl libc through the libc crate v0.2.175+, see rust-lang/libc#3976
This PR enables the feature. Note that this will likely cause build breakages anywhere rustix is used, and the issue has already popped up in the rustix repo bytecodealliance/rustix#1496 for archs that never supported musl <1.2.5
This is my first PR here and I need some help coordinating between all these moving parts. @Gankra could you help maybe? Thanks!
More refs:
#67774
vectordotdev/vector#23813
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/98199
r? @Gankra