Tweaks and add a Dockerfile for Android (#8036)

This commit is contained in:
Pierre Krieger
2018-04-05 14:38:50 +02:00
committed by GitHub
parent 0d2993e46d
commit 27c32d3629
8 changed files with 353 additions and 17 deletions

View File

@@ -210,7 +210,7 @@ impl SocketAddrExt for IpAddr {
}
}
#[cfg(not(windows))]
#[cfg(not(any(windows, target_os = "android")))]
mod getinterfaces {
use std::{mem, io, ptr};
use libc::{AF_INET, AF_INET6};
@@ -280,12 +280,12 @@ mod getinterfaces {
}
}
#[cfg(not(windows))]
#[cfg(not(any(windows, target_os = "android")))]
fn get_if_addrs() -> io::Result<Vec<IpAddr>> {
getinterfaces::get_all()
}
#[cfg(windows)]
#[cfg(any(windows, target_os = "android"))]
fn get_if_addrs() -> io::Result<Vec<IpAddr>> {
Ok(Vec::new())
}