Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build for BSDs #11372

Merged
merged 3 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/nu-command/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ libc = "0.2"
umask = "2.1"
nix = { version = "0.27", default-features = false, features = ["user", "resource"] }

[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "android"), not(target_os = "ios"), not(target_os = "netbsd")))'.dependencies]
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
procfs = "0.16.0"

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies.trash]
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/platform/ulimit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static RESOURCE_ARRAY: Lazy<Vec<ResourceInfo>> = Lazy::new(|| {
"Maximum number of pseudo-terminals",
'P',
1,
Resource::RLIMIT_NPTY,
Resource::RLIMIT_NPTS,
),
];

Expand Down
6 changes: 0 additions & 6 deletions crates/nu-command/src/system/ps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ use itertools::Itertools;
not(target_os = "macos"),
not(target_os = "windows"),
not(target_os = "android"),
not(target_os = "ios"),
not(target_os = "netbsd")
))]
use nu_protocol::Span;
use nu_protocol::{
Expand All @@ -20,8 +18,6 @@ use nu_protocol::{
not(target_os = "macos"),
not(target_os = "windows"),
not(target_os = "android"),
not(target_os = "ios"),
not(target_os = "netbsd")
))]
use procfs::WithCurrentSystemInfo;

Expand Down Expand Up @@ -125,8 +121,6 @@ fn run_ps(engine_state: &EngineState, call: &Call) -> Result<PipelineData, Shell
not(target_os = "macos"),
not(target_os = "windows"),
not(target_os = "android"),
not(target_os = "ios"),
not(target_os = "netbsd")
))]
{
let proc_stat = proc
Expand Down
1 change: 1 addition & 0 deletions crates/nu-command/tests/commands/ulimit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ fn limit_set_invalid1() {
});
}

#[cfg(any(target_os = "linux", target_os = "macos"))]
#[test]
fn limit_set_invalid2() {
Playground::setup("limit_set_invalid2", |dirs, _sandbox| {
Expand Down