Skip to content

Commit

Permalink
std::fs::DirEntry.metadata(): prefer use of lstat() on Emscripten
Browse files Browse the repository at this point in the history
Align it with musl, which also prefers using lstat() here.
  • Loading branch information
kleisauke authored and gitbot committed Feb 20, 2025
1 parent ce148e6 commit 01fcc39
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions std/src/sys/pal/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ mod tests;
use libc::c_char;
#[cfg(any(
all(target_os = "linux", not(target_env = "musl")),
target_os = "emscripten",
target_os = "android",
target_os = "hurd"
))]
use libc::dirfd;
#[cfg(any(
all(target_os = "linux", not(target_env = "musl")),
target_os = "emscripten",
target_os = "hurd"
))]
#[cfg(any(all(target_os = "linux", not(target_env = "musl")), target_os = "hurd"))]
use libc::fstatat64;
#[cfg(any(
target_os = "android",
Expand Down Expand Up @@ -896,7 +891,6 @@ impl DirEntry {
#[cfg(all(
any(
all(target_os = "linux", not(target_env = "musl")),
target_os = "emscripten",
target_os = "android",
target_os = "hurd"
),
Expand Down Expand Up @@ -925,7 +919,6 @@ impl DirEntry {
#[cfg(any(
not(any(
all(target_os = "linux", not(target_env = "musl")),
target_os = "emscripten",
target_os = "android",
target_os = "hurd",
)),
Expand Down

0 comments on commit 01fcc39

Please sign in to comment.