Skip to content

Commit 6d0862c

Browse files
authored
fix: fixed build on android (#1936)
1 parent 5bf511e commit 6d0862c

File tree

1 file changed

+3
-6
lines changed
  • crates/shadowsocks/src/net/sys/unix/linux

1 file changed

+3
-6
lines changed

crates/shadowsocks/src/net/sys/unix/linux/mod.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl TcpStream {
5656
// This is a workaround for VPNService
5757
#[cfg(target_os = "android")]
5858
if !addr.ip().is_loopback() {
59-
use std::{io::ErrorKind, time::Duration};
59+
use std::time::Duration;
6060
use tokio::time;
6161

6262
if let Some(ref path) = opts.vpn_protect_path {
@@ -332,7 +332,7 @@ pub async fn bind_outbound_udp_socket(bind_addr: &SocketAddr, config: &ConnectOp
332332
// This is a workaround for VPNService
333333
#[cfg(target_os = "android")]
334334
{
335-
use std::{io::ErrorKind, time::Duration};
335+
use std::time::Duration;
336336
use tokio::time;
337337

338338
if let Some(ref path) = config.vpn_protect_path {
@@ -397,10 +397,7 @@ fn set_bindtodevice<S: AsRawFd>(socket: &S, iface: &str) -> io::Result<()> {
397397

398398
cfg_if! {
399399
if #[cfg(target_os = "android")] {
400-
use std::{
401-
io::ErrorKind,
402-
path::Path,
403-
};
400+
use std::path::Path;
404401
use tokio::io::AsyncReadExt;
405402

406403
use super::uds::UnixStream;

0 commit comments

Comments
 (0)