From e2d745b797201220cfd7e960ff08f7ca25e64828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Neusch=C3=A4fer?= Date: Wed, 16 Oct 2024 09:05:59 +0200 Subject: [PATCH] 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 --- ci/install-musl.sh | 2 +- src/unix/linux_like/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/install-musl.sh b/ci/install-musl.sh index 5f8c681fa6678..491852e9f0bab 100644 --- 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 39a7fd49720cc..6d0c746e878e5 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -1888,7 +1888,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"))] { 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;