diff --git a/dubbo/src/triple/transport/connector/mod.rs b/dubbo/src/triple/transport/connector/mod.rs index 690b781a..66f95e87 100644 --- a/dubbo/src/triple/transport/connector/mod.rs +++ b/dubbo/src/triple/transport/connector/mod.rs @@ -17,7 +17,7 @@ pub mod http_connector; pub mod https_connector; -#[cfg(any(target_os = "macos", target_os = "unix"))] +#[cfg(any(target_os = "macos", target_family = "unix"))] pub mod unix_connector; use hyper::Uri; @@ -84,7 +84,7 @@ pub fn get_connector(connector: &str) -> BoxCloneService { let c = unix_connector::UnixConnector::new(); BoxCloneService::new(Connector::new(c)) diff --git a/dubbo/src/triple/transport/listener/mod.rs b/dubbo/src/triple/transport/listener/mod.rs index 0be7415f..4f01ef00 100644 --- a/dubbo/src/triple/transport/listener/mod.rs +++ b/dubbo/src/triple/transport/listener/mod.rs @@ -16,7 +16,7 @@ */ pub mod tcp_listener; -#[cfg(any(target_os = "macos", target_os = "unix"))] +#[cfg(any(target_os = "macos", target_family = "unix"))] pub mod unix_listener; use std::net::SocketAddr; @@ -65,7 +65,7 @@ impl Listener for WrappedListener { pub async fn get_listener(name: String, addr: SocketAddr) -> Result { match name.as_str() { "tcp" => Ok(TcpListener::bind(addr).await?.boxed()), - #[cfg(any(target_os = "macos", target_os = "unix"))] + #[cfg(any(target_os = "macos", target_family = "unix"))] "unix" => Ok(unix_listener::UnixListener::bind(addr).await?.boxed()), _ => { warn!("no support listener: {:?}", name);