Skip to content

Commit

Permalink
Enable statx on musl-libc
Browse files Browse the repository at this point in the history
Version 1.2.5 of musl-libc added support for the statx system call[1].

[1]: https://musl.libc.org/releases.html
  • Loading branch information
neuschaefer committed Nov 22, 2024
1 parent aab8d07 commit 33d2128
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/install-musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

set -eux

musl_version=1.1.24
musl_version=1.2.5
musl="musl-${musl_version}"

# Download, configure, build, and install musl:
Expand Down
6 changes: 3 additions & 3 deletions src/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ s! {
}

cfg_if! {
if #[cfg(any(target_env = "gnu", target_os = "android"))] {
if #[cfg(any(target_env = "gnu", target_os = "android", target_env = "musl"))] {
s! {
pub struct statx {
pub stx_mask: ::__u32,
Expand Down Expand Up @@ -1574,7 +1574,7 @@ cfg_if! {
}

cfg_if! {
if #[cfg(any(target_env = "gnu", target_os = "android"))] {
if #[cfg(any(target_env = "gnu", target_os = "android", target_env = "musl"))] {
pub const AT_STATX_SYNC_TYPE: ::c_int = 0x6000;
pub const AT_STATX_SYNC_AS_STAT: ::c_int = 0x0000;
pub const AT_STATX_FORCE_SYNC: ::c_int = 0x2000;
Expand Down Expand Up @@ -1973,7 +1973,7 @@ cfg_if! {

// The statx syscall, available on some libcs.
cfg_if! {
if #[cfg(any(target_env = "gnu", target_os = "android"))] {
if #[cfg(any(target_env = "gnu", target_os = "android", target_env = "musl"))] {
extern "C" {
pub fn statx(
dirfd: ::c_int,
Expand Down

0 comments on commit 33d2128

Please sign in to comment.