From 4875c52f56ade14fe84010488ebebb793271c613 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 24 Jan 2022 14:45:55 -0800 Subject: Don't define the `*_SUPER_MAGIC` constants on Emscripten. --- src/unix/linux_like/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index 89d67a6f14..19dfb8f586 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -1366,7 +1366,9 @@ pub const ARPHRD_VOID: u16 = 0xFFFF; pub const ARPHRD_NONE: u16 = 0xFFFE; cfg_if! { - if #[cfg(not(target_arch = "s390x"))] { + if #[cfg(target_os = "emscripten")] { + // Emscripten does not define any `*_SUPER_MAGIC` constants. + } else if #[cfg(not(target_arch = "s390x"))] { pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5; pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff; pub const AFS_SUPER_MAGIC: ::c_long = 0x5346414f; -- cgit v1.2.1