Skip to content

Commit

Permalink
Fix compilation on emscripten.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Jan 23, 2025
1 parent 67f5ea7 commit ac8346c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/backend/libc/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,10 @@ pub(super) use readwrite_pv64v2::{preadv64v2 as preadv2, pwritev64v2 as pwritev2

// Rust's libc crate lacks statx for Non-glibc targets.
#[cfg(feature = "fs")]
#[cfg(all(linux_like, not(any(target_os = "android", target_env = "gnu"))))]
#[cfg(all(
linux_like,
not(any(target_os = "android", target_os = "emscripten", target_env = "gnu"))
))]
mod statx_flags {
pub(crate) use linux_raw_sys::general::{
STATX_ALL, STATX_ATIME, STATX_BASIC_STATS, STATX_BLOCKS, STATX_BTIME, STATX_CTIME,
Expand All @@ -501,7 +504,10 @@ mod statx_flags {
};
}
#[cfg(feature = "fs")]
#[cfg(all(linux_like, not(any(target_os = "android", target_env = "gnu"))))]
#[cfg(all(
linux_like,
not(any(target_os = "android", target_os = "emscripten", target_env = "gnu"))
))]
pub(crate) use statx_flags::*;

#[cfg(feature = "fs")]
Expand Down

0 comments on commit ac8346c

Please sign in to comment.