Skip to content

Commit

Permalink
bump nix to 0.28.0 (solana-labs#628)
Browse files Browse the repository at this point in the history
* bump nix to 0.28.0

* enable 'socket' for net-utils

* enable 'signal' for install

* enable 'user' for perf

* enable 'net' for streamer
  • Loading branch information
yihau authored and jeffwashington committed Apr 12, 2024
1 parent 7da58df commit 6b7fbc5
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 51 deletions.
33 changes: 6 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion install/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion net-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
8 changes: 4 additions & 4 deletions net-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,16 +397,16 @@ fn udp_socket(reuseaddr: bool) -> io::Result<Socket> {
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)
Expand Down
2 changes: 1 addition & 1 deletion perf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion perf/src/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn nice(adjustment: i8) -> Result<i8, nix::errno::Errno> {
}
}
.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,
Expand Down
19 changes: 5 additions & 14 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion streamer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 6b7fbc5

Please sign in to comment.