From c5739567a36fd37190743a49c3027616ce3d79a7 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Tue, 29 Sep 2020 12:32:53 +0100 Subject: Support vsock on Android as well as Linux. Fix deprecation warning from libc update. --- src/sys/socket/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sys/socket/mod.rs') diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 1f6b179d..31183fe8 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -33,7 +33,7 @@ pub use self::addr::{ pub use crate::sys::socket::addr::netlink::NetlinkAddr; #[cfg(any(target_os = "android", target_os = "linux"))] pub use crate::sys::socket::addr::alg::AlgAddr; -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "android", target_os = "linux"))] pub use crate::sys::socket::addr::vsock::VsockAddr; pub use libc::{ @@ -1737,7 +1737,7 @@ pub fn sockaddr_storage_to_addr( }; Ok(SockAddr::Alg(AlgAddr(salg))) } - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "android", target_os = "linux"))] libc::AF_VSOCK => { use libc::sockaddr_vm; let svm = unsafe { -- cgit v1.2.3