Skip to content

Commit 3d82541

Browse files
authored
Do not define statx_flags for LoongArch64 with musl (#1503)
`libc` already defines constants like `STATX_TYPE` for `musl 1.2.3+` [^1], so `statx_flags` is unnecessary in this environment. [^1]: https://docs.rs/libc/latest/src/libc/unix/linux_like/mod.rs.html#1679 Fixes #1502
1 parent abb4ca0 commit 3d82541

File tree

1 file changed

+10
-2
lines changed
  • src/backend/libc

1 file changed

+10
-2
lines changed

src/backend/libc/c.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,11 @@ pub(super) use readwrite_pv64v2::{preadv64v2 as preadv2, pwritev64v2 as pwritev2
490490
#[cfg(all(
491491
linux_like,
492492
linux_raw_dep,
493-
not(any(target_os = "emscripten", target_env = "gnu"))
493+
not(any(
494+
target_os = "emscripten",
495+
target_env = "gnu",
496+
all(target_arch = "loongarch64", target_env = "musl")
497+
))
494498
))]
495499
mod statx_flags {
496500
pub(crate) use linux_raw_sys::general::{
@@ -509,7 +513,11 @@ mod statx_flags {
509513
#[cfg(all(
510514
linux_like,
511515
linux_raw_dep,
512-
not(any(target_os = "emscripten", target_env = "gnu"))
516+
not(any(
517+
target_os = "emscripten",
518+
target_env = "gnu",
519+
all(target_arch = "loongarch64", target_env = "musl")
520+
))
513521
))]
514522
pub(crate) use statx_flags::*;
515523

0 commit comments

Comments
 (0)