mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
net: support Nuttx target os (#8259)
Signed-off-by: wanglei <[email protected]>
This commit is contained in:
@@ -286,6 +286,7 @@ impl TcpSocket {
|
|||||||
not(target_os = "solaris"),
|
not(target_os = "solaris"),
|
||||||
not(target_os = "illumos"),
|
not(target_os = "illumos"),
|
||||||
not(target_os = "cygwin"),
|
not(target_os = "cygwin"),
|
||||||
|
not(target_os = "nuttx"),
|
||||||
))]
|
))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
docsrs,
|
docsrs,
|
||||||
@@ -294,6 +295,7 @@ impl TcpSocket {
|
|||||||
not(target_os = "solaris"),
|
not(target_os = "solaris"),
|
||||||
not(target_os = "illumos"),
|
not(target_os = "illumos"),
|
||||||
not(target_os = "cygwin"),
|
not(target_os = "cygwin"),
|
||||||
|
not(target_os = "nuttx"),
|
||||||
)))
|
)))
|
||||||
)]
|
)]
|
||||||
pub fn set_reuseport(&self, reuseport: bool) -> io::Result<()> {
|
pub fn set_reuseport(&self, reuseport: bool) -> io::Result<()> {
|
||||||
@@ -331,6 +333,7 @@ impl TcpSocket {
|
|||||||
not(target_os = "solaris"),
|
not(target_os = "solaris"),
|
||||||
not(target_os = "illumos"),
|
not(target_os = "illumos"),
|
||||||
not(target_os = "cygwin"),
|
not(target_os = "cygwin"),
|
||||||
|
not(target_os = "nuttx"),
|
||||||
))]
|
))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
docsrs,
|
docsrs,
|
||||||
@@ -339,6 +342,7 @@ impl TcpSocket {
|
|||||||
not(target_os = "solaris"),
|
not(target_os = "solaris"),
|
||||||
not(target_os = "illumos"),
|
not(target_os = "illumos"),
|
||||||
not(target_os = "cygwin"),
|
not(target_os = "cygwin"),
|
||||||
|
not(target_os = "nuttx"),
|
||||||
)))
|
)))
|
||||||
)]
|
)]
|
||||||
pub fn reuseport(&self) -> io::Result<bool> {
|
pub fn reuseport(&self) -> io::Result<bool> {
|
||||||
|
|||||||
@@ -67,7 +67,12 @@ pub(crate) use self::impl_solaris::get_peer_cred;
|
|||||||
#[cfg(target_os = "aix")]
|
#[cfg(target_os = "aix")]
|
||||||
pub(crate) use self::impl_aix::get_peer_cred;
|
pub(crate) use self::impl_aix::get_peer_cred;
|
||||||
|
|
||||||
#[cfg(any(target_os = "espidf", target_os = "vita", target_os = "hurd"))]
|
#[cfg(any(
|
||||||
|
target_os = "espidf",
|
||||||
|
target_os = "nuttx",
|
||||||
|
target_os = "vita",
|
||||||
|
target_os = "hurd"
|
||||||
|
))]
|
||||||
pub(crate) use self::impl_noproc::get_peer_cred;
|
pub(crate) use self::impl_noproc::get_peer_cred;
|
||||||
|
|
||||||
#[cfg(any(
|
#[cfg(any(
|
||||||
@@ -390,7 +395,12 @@ pub(crate) mod impl_aix {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "espidf", target_os = "vita", target_os = "hurd"))]
|
#[cfg(any(
|
||||||
|
target_os = "espidf",
|
||||||
|
target_os = "nuttx",
|
||||||
|
target_os = "vita",
|
||||||
|
target_os = "hurd"
|
||||||
|
))]
|
||||||
pub(crate) mod impl_noproc {
|
pub(crate) mod impl_noproc {
|
||||||
use crate::net::unix::UnixStream;
|
use crate::net::unix::UnixStream;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|||||||
Reference in New Issue
Block a user