diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index 1faf603be..357f87922 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml @@ -45,6 +45,7 @@ stable_deref_trait = { version = "1.2.0", default-features = false } futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } atomic-pool = "1.0" embedded-nal-async = { version = "0.3.0", optional = true } +atomic-polyfill = { version = "1.0" } [dependencies.smoltcp] version = "0.8.0" diff --git a/embassy-net/src/tcp.rs b/embassy-net/src/tcp.rs index 55cbda455..0dc8da73a 100644 --- a/embassy-net/src/tcp.rs +++ b/embassy-net/src/tcp.rs @@ -329,8 +329,8 @@ pub mod client { use core::cell::UnsafeCell; use core::mem::MaybeUninit; use core::ptr::NonNull; - use core::sync::atomic::{AtomicBool, Ordering}; + use atomic_polyfill::{AtomicBool, Ordering}; use embedded_nal_async::IpAddr; use super::*;