Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emscripten: Assume version is at least 3.1.42 #4243

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{env, str};
// need to know all the possible cfgs that this script will set. If you need to set another cfg
// make sure to add it to this list as well.
const ALLOWED_CFGS: &'static [&'static str] = &[
"emscripten_new_stat_abi",
"emscripten_old_stat_abi",
"espidf_time32",
"freebsd10",
"freebsd11",
Expand Down Expand Up @@ -76,9 +76,9 @@ fn main() {
}

match emcc_version_code() {
Some(v) if (v >= 30142) => set_cfg("emscripten_new_stat_abi"),
// Non-Emscripten or version < 3.1.42.
Some(_) | None => (),
Some(v) if (v < 30142) => set_cfg("emscripten_old_stat_abi"),
// Non-Emscripten or version >= 3.1.42.
_ => (),
}

if linux_time_bits64 {
Expand Down
2 changes: 1 addition & 1 deletion ci/emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eux

# Note: keep in sync with:
# https://github.com/rust-lang/rust/blob/master/src/ci/docker/scripts/emscripten.sh
# https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/wasm32-unknown-emscripten.md#requirements
emsdk_version=3.1.68

git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable
Expand Down
6 changes: 3 additions & 3 deletions src/unix/linux_like/emscripten/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,16 @@ s! {
}
pub struct stat {
pub st_dev: crate::dev_t,
#[cfg(not(emscripten_new_stat_abi))]
#[cfg(emscripten_old_stat_abi)]
__st_dev_padding: c_int,
#[cfg(not(emscripten_new_stat_abi))]
#[cfg(emscripten_old_stat_abi)]
__st_ino_truncated: c_long,
pub st_mode: crate::mode_t,
pub st_nlink: crate::nlink_t,
pub st_uid: crate::uid_t,
pub st_gid: crate::gid_t,
pub st_rdev: crate::dev_t,
#[cfg(not(emscripten_new_stat_abi))]
#[cfg(emscripten_old_stat_abi)]
__st_rdev_padding: c_int,
pub st_size: off_t,
pub st_blksize: crate::blksize_t,
Expand Down
Loading