mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
net: implement UCred
for espidf (#5868)
This commit is contained in:
parent
d64c8e3ae0
commit
02544540f1
@ -54,6 +54,9 @@ 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(target_os = "espidf")]
|
||||||
|
pub(crate) use self::impl_noproc::get_peer_cred;
|
||||||
|
|
||||||
#[cfg(any(
|
#[cfg(any(
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
target_os = "redox",
|
target_os = "redox",
|
||||||
@ -291,3 +294,17 @@ pub(crate) mod impl_aix {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "espidf")]
|
||||||
|
pub(crate) mod impl_noproc {
|
||||||
|
use crate::net::unix::UnixStream;
|
||||||
|
use std::io;
|
||||||
|
|
||||||
|
pub(crate) fn get_peer_cred(_sock: &UnixStream) -> io::Result<super::UCred> {
|
||||||
|
Ok(super::UCred {
|
||||||
|
uid: 0,
|
||||||
|
gid: 0,
|
||||||
|
pid: None,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user