net: support QNX OS (#6421)

Co-authored-by: Akhil Thankachan Thomas <[email protected]>
This commit is contained in:
Sebastian Schildt
2024-05-14 13:11:37 +02:00
committed by GitHub
co-authored by Akhil Thankachan Thomas
parent 6fcd9c0217
commit 227979f091
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -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"))]
@@ -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};
+4
View File
@@ -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
}
@@ -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
}