Skip to content

Commit 2d291e4

Browse files
kleisaukegitbot
authored and
gitbot
committed
Avoid use of LFS64 symbols on Emscripten
Since Emscripten uses musl libc internally. Non-functional change: all LFS64 symbols were aliased to their non-LFS64 counterparts in rust-lang/libc@7c952dc.
1 parent edaf2b2 commit 2d291e4

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

std/src/os/emscripten/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub trait MetadataExt {
6363
impl MetadataExt for Metadata {
6464
#[allow(deprecated)]
6565
fn as_raw_stat(&self) -> &raw::stat {
66-
unsafe { &*(self.as_inner().as_inner() as *const libc::stat64 as *const raw::stat) }
66+
unsafe { &*(self.as_inner().as_inner() as *const libc::stat as *const raw::stat) }
6767
}
6868
fn st_dev(&self) -> u64 {
6969
self.as_inner().as_inner().st_dev as u64

std/src/os/emscripten/raw.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
//! Emscripten-specific raw type definitions
2-
//! This is basically exactly the same as the linux definitions,
3-
//! except using the musl-specific stat64 structure in liblibc.
42
53
#![stable(feature = "raw_ext", since = "1.1.0")]
64
#![deprecated(

std/src/sys/pal/unix/fd.rs

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ mod tests;
55

66
#[cfg(not(any(
77
target_os = "linux",
8-
target_os = "emscripten",
98
target_os = "l4re",
109
target_os = "android",
1110
target_os = "hurd",
@@ -14,7 +13,6 @@ use libc::off_t as off64_t;
1413
#[cfg(any(
1514
target_os = "android",
1615
target_os = "linux",
17-
target_os = "emscripten",
1816
target_os = "l4re",
1917
target_os = "hurd",
2018
))]

std/src/sys/pal/unix/fs.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ use libc::readdir as readdir64;
3434
#[cfg(not(any(
3535
target_os = "android",
3636
target_os = "linux",
37-
target_os = "emscripten",
3837
target_os = "solaris",
3938
target_os = "illumos",
4039
target_os = "l4re",
@@ -48,7 +47,7 @@ use libc::readdir as readdir64;
4847
use libc::readdir_r as readdir64_r;
4948
#[cfg(any(all(target_os = "linux", not(target_env = "musl")), target_os = "hurd"))]
5049
use libc::readdir64;
51-
#[cfg(any(target_os = "emscripten", target_os = "l4re"))]
50+
#[cfg(target_os = "l4re")]
5251
use libc::readdir64_r;
5352
use libc::{c_int, mode_t};
5453
#[cfg(target_os = "android")]
@@ -58,7 +57,6 @@ use libc::{
5857
};
5958
#[cfg(not(any(
6059
all(target_os = "linux", not(target_env = "musl")),
61-
target_os = "emscripten",
6260
target_os = "l4re",
6361
target_os = "android",
6462
target_os = "hurd",
@@ -69,7 +67,6 @@ use libc::{
6967
};
7068
#[cfg(any(
7169
all(target_os = "linux", not(target_env = "musl")),
72-
target_os = "emscripten",
7370
target_os = "l4re",
7471
target_os = "hurd"
7572
))]

0 commit comments

Comments
 (0)