Skip to content

Commit

Permalink
use netbsd for ucred on qnx
Browse files Browse the repository at this point in the history
  • Loading branch information
AkhilTThomas committed May 7, 2024
1 parent 8af16c5 commit 29cfcf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tokio/src/net/unix/ucred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ impl UCred {
))]
pub(crate) use self::impl_linux::get_peer_cred;

#[cfg(target_os = "netbsd")]
#[cfg(any(target_os = "netbsd", target_os = "nto"))]
pub(crate) use self::impl_netbsd::get_peer_cred;

#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "nto"))]
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
pub(crate) use self::impl_bsd::get_peer_cred;

#[cfg(any(
Expand Down Expand Up @@ -119,7 +119,7 @@ pub(crate) mod impl_linux {
}
}

#[cfg(target_os = "netbsd")]
#[cfg(any(target_os = "netbsd", target_os = "nto"))]
pub(crate) mod impl_netbsd {
use crate::net::unix::{self, UnixStream};

Expand Down Expand Up @@ -161,7 +161,7 @@ pub(crate) mod impl_netbsd {
}
}

#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "nto"))]
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
pub(crate) mod impl_bsd {
use crate::net::unix::{self, UnixStream};

Expand Down
3 changes: 1 addition & 2 deletions tokio/src/process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,7 @@ impl Command {
#[cfg_attr(docsrs, doc(cfg(unix)))]
pub fn uid(&mut self, id: u32) -> &mut Command {
#[cfg(target_os = "nto")]
self.std.uid(id as i32);
#[cfg(not(target_os = "nto"))]
let id = id as i32;
self.std.uid(id);
self
}
Expand Down

0 comments on commit 29cfcf8

Please sign in to comment.