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 committed Dec 9, 2024
1 parent 08644b7 commit dbe9724
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions library/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 @@ -893,7 +888,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 @@ -922,7 +916,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 dbe9724

Please sign in to comment.