diff --git a/library/std/src/sys/thread_local/key/unix.rs b/library/std/src/sys/thread_local/key/unix.rs index 6661e378dbf4..b4b58b347063 100644 --- a/library/std/src/sys/thread_local/key/unix.rs +++ b/library/std/src/sys/thread_local/key/unix.rs @@ -1,7 +1,7 @@ use crate::mem; // For WASI add a few symbols not in upstream `libc` just yet. -#[cfg(target_os = "wasi")] +#[cfg(all(target_os = "wasi", target_env = "p1", target_feature = "atomics"))] mod libc { use crate::ffi;