mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 10:09:17 +08:00
ProtocolType::Dns exists only if feature local-dns enabled
- fixes #469
This commit is contained in:
@@ -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
|
||||
//
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user