diff --git a/ci/install-musl.sh b/ci/install-musl.sh index 1cf1ec6500cde..1a4819b55c2d2 100755 --- a/ci/install-musl.sh +++ b/ci/install-musl.sh @@ -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: diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index 03461ff097091..26e78442f0951 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -206,7 +206,11 @@ 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, @@ -1574,7 +1578,11 @@ 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; @@ -1973,7 +1981,11 @@ 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,