mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
net: support QNX OS (#6421)
Co-authored-by: Akhil Thankachan Thomas <[email protected]>
This commit is contained in:
co-authored by
Akhil Thankachan Thomas
parent
6fcd9c0217
commit
227979f091
@@ -39,7 +39,7 @@ impl UCred {
|
|||||||
))]
|
))]
|
||||||
pub(crate) use self::impl_linux::get_peer_cred;
|
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;
|
pub(crate) use self::impl_netbsd::get_peer_cred;
|
||||||
|
|
||||||
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
|
#[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 {
|
pub(crate) mod impl_netbsd {
|
||||||
use crate::net::unix::{self, UnixStream};
|
use crate::net::unix::{self, UnixStream};
|
||||||
|
|
||||||
|
|||||||
@@ -672,6 +672,8 @@ impl Command {
|
|||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
#[cfg_attr(docsrs, doc(cfg(unix)))]
|
#[cfg_attr(docsrs, doc(cfg(unix)))]
|
||||||
pub fn uid(&mut self, id: u32) -> &mut Command {
|
pub fn uid(&mut self, id: u32) -> &mut Command {
|
||||||
|
#[cfg(target_os = "nto")]
|
||||||
|
let id = id as i32;
|
||||||
self.std.uid(id);
|
self.std.uid(id);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
@@ -681,6 +683,8 @@ impl Command {
|
|||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
#[cfg_attr(docsrs, doc(cfg(unix)))]
|
#[cfg_attr(docsrs, doc(cfg(unix)))]
|
||||||
pub fn gid(&mut self, id: u32) -> &mut Command {
|
pub fn gid(&mut self, id: u32) -> &mut Command {
|
||||||
|
#[cfg(target_os = "nto")]
|
||||||
|
let id = id as i32;
|
||||||
self.std.gid(id);
|
self.std.gid(id);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user