diff --git a/Cargo.lock b/Cargo.lock index 0a53f632b..d6d46f367 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -116,7 +116,7 @@ dependencies = [ "dirs-next", "indicatif", "lazy_static", - "nix 0.26.4", + "nix", "reqwest", "scopeguard", "semver 1.0.22", @@ -1710,7 +1710,7 @@ version = "3.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" dependencies = [ - "nix 0.28.0", + "nix", "windows-sys 0.52.0", ] @@ -3343,15 +3343,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -3494,19 +3485,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if 1.0.0", - "libc", - "memoffset 0.7.1", - "pin-utils", -] - [[package]] name = "nix" version = "0.28.0" @@ -3517,6 +3495,7 @@ dependencies = [ "cfg-if 1.0.0", "cfg_aliases", "libc", + "memoffset 0.9.0", ] [[package]] @@ -6536,7 +6515,7 @@ dependencies = [ "clap 3.2.23", "crossbeam-channel", "log", - "nix 0.26.4", + "nix", "rand 0.8.5", "serde", "serde_derive", @@ -6580,7 +6559,7 @@ dependencies = [ "lazy_static", "libc", "log", - "nix 0.26.4", + "nix", "rand 0.8.5", "rand_chacha 0.3.1", "rayon", @@ -7281,7 +7260,7 @@ dependencies = [ "itertools", "libc", "log", - "nix 0.26.4", + "nix", "pem", "percentage", "quinn", diff --git a/Cargo.toml b/Cargo.toml index 7f2855b89..892f32d8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -252,7 +252,7 @@ merlin = "3" min-max-heap = "1.3.0" mockall = "0.11.4" modular-bitfield = "0.11.2" -nix = "0.26.4" +nix = "0.28.0" num-bigint = "0.4.4" num-derive = "0.4" num-traits = "0.2" diff --git a/install/Cargo.toml b/install/Cargo.toml index c40a0ee6e..a09d08c54 100644 --- a/install/Cargo.toml +++ b/install/Cargo.toml @@ -21,7 +21,7 @@ ctrlc = { workspace = true, features = ["termination"] } dirs-next = { workspace = true } indicatif = { workspace = true } lazy_static = { workspace = true } -nix = { workspace = true } +nix = { workspace = true, features = ["signal"] } reqwest = { workspace = true, features = ["blocking", "brotli", "deflate", "gzip", "rustls-tls", "json"] } scopeguard = { workspace = true } semver = { workspace = true } diff --git a/net-utils/Cargo.toml b/net-utils/Cargo.toml index 3486b30bb..1ba1f95ee 100644 --- a/net-utils/Cargo.toml +++ b/net-utils/Cargo.toml @@ -14,7 +14,7 @@ bincode = { workspace = true } clap = { version = "3.1.5", features = ["cargo"] } crossbeam-channel = { workspace = true } log = { workspace = true } -nix = { workspace = true } +nix = { workspace = true, features = ["socket"] } rand = { workspace = true } serde = { workspace = true } serde_derive = { workspace = true } diff --git a/net-utils/src/lib.rs b/net-utils/src/lib.rs index 2d1b6249f..e7df091ed 100644 --- a/net-utils/src/lib.rs +++ b/net-utils/src/lib.rs @@ -397,16 +397,16 @@ fn udp_socket(reuseaddr: bool) -> io::Result { setsockopt, sockopt::{ReuseAddr, ReusePort}, }, - std::os::unix::io::AsRawFd, + std::os::fd::AsFd, }; let sock = Socket::new(Domain::IPV4, Type::DGRAM, None)?; - let sock_fd = sock.as_raw_fd(); + let sock_fd = sock.as_fd(); if reuseaddr { // best effort, i.e. ignore errors here, we'll get the failure in caller - setsockopt(sock_fd, ReusePort, &true).ok(); - setsockopt(sock_fd, ReuseAddr, &true).ok(); + setsockopt(&sock_fd, ReusePort, &true).ok(); + setsockopt(&sock_fd, ReuseAddr, &true).ok(); } Ok(sock) diff --git a/perf/Cargo.toml b/perf/Cargo.toml index b62484f42..e2e802908 100644 --- a/perf/Cargo.toml +++ b/perf/Cargo.toml @@ -31,7 +31,7 @@ solana-vote-program = { workspace = true } [target."cfg(target_os = \"linux\")".dependencies] caps = { workspace = true } libc = { workspace = true } -nix = { workspace = true } +nix = { workspace = true, features = ["user"] } [lib] name = "solana_perf" diff --git a/perf/src/thread.rs b/perf/src/thread.rs index bb3759f82..36cfde108 100644 --- a/perf/src/thread.rs +++ b/perf/src/thread.rs @@ -14,7 +14,7 @@ fn nice(adjustment: i8) -> Result { } } .map(|niceness| i8::try_from(niceness).expect("Unexpected niceness value")) - .map_err(nix::errno::from_i32) + .map_err(nix::errno::Errno::from_raw) } /// Adds `adjustment` to the nice value of calling thread. Negative `adjustment` increases priority, diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 08488d5d7..da2b16eaf 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -2840,15 +2840,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -3002,15 +2993,15 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.4" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "cfg-if 1.0.0", + "cfg_aliases", "libc", - "memoffset 0.7.1", - "pin-utils", + "memoffset 0.9.0", ] [[package]] diff --git a/streamer/Cargo.toml b/streamer/Cargo.toml index 68a7264eb..ebd7c7401 100644 --- a/streamer/Cargo.toml +++ b/streamer/Cargo.toml @@ -19,7 +19,7 @@ indexmap = { workspace = true } itertools = { workspace = true } libc = { workspace = true } log = { workspace = true } -nix = { workspace = true } +nix = { workspace = true, features = ["net"] } pem = { workspace = true } percentage = { workspace = true } quinn = { workspace = true }