diff --git a/realm_core/src/dns/mod.rs b/realm_core/src/dns/mod.rs index ad5d489..d2675d6 100644 --- a/realm_core/src/dns/mod.rs +++ b/realm_core/src/dns/mod.rs @@ -10,8 +10,12 @@ use resolver::lookup_ip::{LookupIp, LookupIpIter}; pub use resolver::config; use config::{ResolverOpts, ResolverConfig}; +#[cfg(not(feature = "multi-thread"))] use once_cell::unsync::{OnceCell, Lazy}; +#[cfg(feature = "multi-thread")] +use once_cell::{unsync::OnceCell, sync::Lazy}; + use crate::endpoint::RemoteAddr; /// Dns config.