sendfd only works on UNIX platforms

This commit is contained in:
zonyitoo
2021-11-16 00:08:26 +08:00
parent e56c08267d
commit 2ab714db31
+3 -1
View File
@@ -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"