Skip to content

Commit

Permalink
Fix build on NetBSD (#11364)
Browse files Browse the repository at this point in the history
- this PR should close #11354

# Description
Allow building on NetBSD.

# User-Facing Changes
NA
  • Loading branch information
0323pin committed Dec 18, 2023
1 parent ec2593e commit 0cba269
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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")))'.dependencies]
[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "android"), not(target_os = "ios"), not(target_os = "netbsd")))'.dependencies]
procfs = "0.16.0"

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

Expand Down Expand Up @@ -123,7 +125,8 @@ 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 = "ios"),
not(target_os = "netbsd")
))]
{
let proc_stat = proc
Expand Down

0 comments on commit 0cba269

Please sign in to comment.