Skip to content

Commit bbd8645

Browse files
neuschaeferDorianNiemiecSVRJS
authored andcommitted
Enable statx on musl-libc
Version 1.2.5 of musl-libc added support for the statx system call[1]. [1]: https://musl.libc.org/releases.html
1 parent 9ac3659 commit bbd8645

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

ci/install-musl.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66
set -eux
77

88
case ${1} in
9-
loongarch64)
10-
musl_version=1.2.5
11-
;;
12-
*)
13-
musl_version=1.1.24
14-
;;
9+
musl_version=1.2.5
10+
;;
1511
esac
1612

1713
musl="musl-${musl_version}"

src/unix/linux_like/mod.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ s! {
208208
}
209209

210210
cfg_if! {
211-
if #[cfg(any(target_env = "gnu", target_os = "android"))] {
211+
if #[cfg(any(
212+
target_env = "gnu",
213+
target_os = "android",
214+
target_env = "musl"
215+
))] {
212216
s! {
213217
pub struct statx {
214218
pub stx_mask: crate::__u32,
@@ -1602,7 +1606,11 @@ cfg_if! {
16021606
}
16031607

16041608
cfg_if! {
1605-
if #[cfg(any(target_env = "gnu", target_os = "android"))] {
1609+
if #[cfg(any(
1610+
target_env = "gnu",
1611+
target_os = "android",
1612+
target_env = "musl"
1613+
))] {
16061614
pub const AT_STATX_SYNC_TYPE: c_int = 0x6000;
16071615
pub const AT_STATX_SYNC_AS_STAT: c_int = 0x0000;
16081616
pub const AT_STATX_FORCE_SYNC: c_int = 0x2000;

0 commit comments

Comments
 (0)