Skip to content

Commit 99dbe40

Browse files
committed
rustix: fixes for Android musl build
Android doesn't only have a bionic toolchain, but musl toolchain for components built on the build workstation.
1 parent 7e36061 commit 99dbe40

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/backend/libc/c.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,8 @@ pub(super) use readwrite_pv64v2::{preadv64v2 as preadv2, pwritev64v2 as pwritev2
489489
#[cfg(feature = "fs")]
490490
#[cfg(all(
491491
linux_like,
492-
not(any(target_os = "android", target_os = "emscripten", target_env = "gnu"))
492+
linux_raw_dep,
493+
not(any(target_os = "emscripten", target_env = "gnu"))
493494
))]
494495
mod statx_flags {
495496
pub(crate) use linux_raw_sys::general::{
@@ -507,7 +508,8 @@ mod statx_flags {
507508
#[cfg(feature = "fs")]
508509
#[cfg(all(
509510
linux_like,
510-
not(any(target_os = "android", target_os = "emscripten", target_env = "gnu"))
511+
linux_raw_dep,
512+
not(any(target_os = "emscripten", target_env = "gnu"))
511513
))]
512514
pub(crate) use statx_flags::*;
513515

src/backend/libc/fs/syscalls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,7 @@ pub(crate) fn statx(
20532053
// doesn't represent all the known flags.
20542054
//
20552055
// [it's deprecated]: https://patchwork.kernel.org/project/linux-fsdevel/patch/20200505095915.11275-7-mszeredi@redhat.com/
2056-
#[cfg(not(target_env = "musl"))]
2056+
#[cfg(any(not(linux_raw_dep), not(target_env = "musl")))]
20572057
const STATX__RESERVED: u32 = c::STATX__RESERVED as u32;
20582058
#[cfg(target_env = "musl")]
20592059
const STATX__RESERVED: u32 = linux_raw_sys::general::STATX__RESERVED;

0 commit comments

Comments
 (0)