diff --git a/bin/sslocal.rs b/bin/sslocal.rs index 5e5e7a4d..9d03120e 100644 --- a/bin/sslocal.rs +++ b/bin/sslocal.rs @@ -306,7 +306,7 @@ fn main() { } } - #[cfg(target_os = "android")] + #[cfg(all(feature = "local-dns", target_os = "android"))] if protocol != ProtocolType::Dns { // Start a DNS local server binding to DNS_LOCAL_ADDR // diff --git a/crates/shadowsocks-service/src/sys/unix/mod.rs b/crates/shadowsocks-service/src/sys/unix/mod.rs index 5cb80698..2c85aeb8 100644 --- a/crates/shadowsocks-service/src/sys/unix/mod.rs +++ b/crates/shadowsocks-service/src/sys/unix/mod.rs @@ -1,8 +1,10 @@ -use std::io::{self, Error}; +use std::io; #[allow(dead_code)] #[cfg(not(target_os = "android"))] pub fn set_nofile(nofile: u64) -> io::Result<()> { + use std::io::Error; + unsafe { // set both soft and hard limit let lim = libc::rlimit {