Skip to content

Commit

Permalink
net: support QNX OS (#6421)
Browse files Browse the repository at this point in the history
Co-authored-by: Akhil Thankachan Thomas <Akhil.Thomas@in.bosch.com>
  • Loading branch information
SebastianSchildt and AkhilTThomas committed May 14, 2024
1 parent 6fcd9c0 commit 227979f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tokio/src/net/unix/ucred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ 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"))]
Expand Down Expand Up @@ -120,7 +120,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
4 changes: 4 additions & 0 deletions tokio/src/process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@ impl Command {
#[cfg(unix)]
#[cfg_attr(docsrs, doc(cfg(unix)))]
pub fn uid(&mut self, id: u32) -> &mut Command {
#[cfg(target_os = "nto")]
let id = id as i32;
self.std.uid(id);
self
}
Expand All @@ -681,6 +683,8 @@ impl Command {
#[cfg(unix)]
#[cfg_attr(docsrs, doc(cfg(unix)))]
pub fn gid(&mut self, id: u32) -> &mut Command {
#[cfg(target_os = "nto")]
let id = id as i32;
self.std.gid(id);
self
}
Expand Down

0 comments on commit 227979f

Please sign in to comment.