From 2ab714db31409e6fa49a18abaaab8bb66fec6522 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Tue, 16 Nov 2021 00:08:26 +0800 Subject: [PATCH] sendfd only works on UNIX platforms --- crates/shadowsocks/Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/shadowsocks/Cargo.toml b/crates/shadowsocks/Cargo.toml index 5f35e35a..15a2215f 100644 --- a/crates/shadowsocks/Cargo.toml +++ b/crates/shadowsocks/Cargo.toml @@ -59,7 +59,6 @@ async-trait = "0.1" socket2 = { version = "0.4", features = ["all"] } tokio = { version = "1.9.0", features = ["io-util", "macros", "net", "parking_lot", "process", "rt", "sync", "time"] } tokio-tfo = "0.1.4" -sendfd = { version = "0.4", features = ["tokio"] } trust-dns-resolver = { version = "0.20", optional = true } arc-swap = { version = "1.3", optional = true } @@ -74,6 +73,9 @@ shadowsocks-crypto = { version = "0.2", features = [] } [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["mswsock", "winsock2", "netioapi"] } +[target.'cfg(unix)'.dependencies] +sendfd = { version = "0.4", features = ["tokio"] } + # Just for the ioctl call macro [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] nix = "0.23"