summaryrefslogtreecommitdiff
path: root/src/sys/socket/mod.rs
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2020-09-29 12:32:53 +0100
committerAndrew Walbran <qwandor@google.com>2020-10-04 20:29:03 +0100
commitc5739567a36fd37190743a49c3027616ce3d79a7 (patch)
tree07ec14d6ec31eae19765c2f76fc2f21fc2a30e03 /src/sys/socket/mod.rs
parent7e46b95057b0d8e391c3fb72fdec08f3a4689631 (diff)
downloadnix-c5739567a36fd37190743a49c3027616ce3d79a7.zip
Support vsock on Android as well as Linux.
Fix deprecation warning from libc update.
Diffstat (limited to 'src/sys/socket/mod.rs')
-rw-r--r--src/sys/socket/mod.rs4
1 files changed, 2 insertions, 2 deletions
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 {