From 4bb4fbc2d66626b4d8fcd55d527b8a2ed7bc6ab4 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Mon, 12 Sep 2022 15:47:46 +0200 Subject: [PATCH] net: fix dependency resolution for socket2 --- tokio/Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index b10b84ce831..f3bbe86cd48 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -51,6 +51,7 @@ net = [ "mio/os-poll", "mio/os-ext", "mio/net", + "socket2", "winapi/fileapi", "winapi/handleapi", "winapi/namedpipeapi", @@ -58,7 +59,7 @@ net = [ "winapi/winnt", "winapi/minwindef", "winapi/accctrl", - "winapi/aclapi" + "winapi/aclapi", ] process = [ "bytes", @@ -118,7 +119,7 @@ num_cpus = { version = "1.8.0", optional = true } parking_lot = { version = "0.12.0", optional = true } [target.'cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))'.dependencies] -socket2 = { version = "0.4.4", features = [ "all" ] } +socket2 = { version = "0.4.4", optional = true, features = [ "all" ] } # Currently unstable. The API exposed by these features may be broken at any time. # Requires `--cfg tokio_unstable` to enable.