Skip to content

Commit 0254454

Browse files
authored
net: implement UCred for espidf (#5868)
1 parent d64c8e3 commit 0254454

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tokio/src/net/unix/ucred.rs

+17
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ pub(crate) use self::impl_solaris::get_peer_cred;
5454
#[cfg(target_os = "aix")]
5555
pub(crate) use self::impl_aix::get_peer_cred;
5656

57+
#[cfg(target_os = "espidf")]
58+
pub(crate) use self::impl_noproc::get_peer_cred;
59+
5760
#[cfg(any(
5861
target_os = "linux",
5962
target_os = "redox",
@@ -291,3 +294,17 @@ pub(crate) mod impl_aix {
291294
}
292295
}
293296
}
297+
298+
#[cfg(target_os = "espidf")]
299+
pub(crate) mod impl_noproc {
300+
use crate::net::unix::UnixStream;
301+
use std::io;
302+
303+
pub(crate) fn get_peer_cred(_sock: &UnixStream) -> io::Result<super::UCred> {
304+
Ok(super::UCred {
305+
uid: 0,
306+
gid: 0,
307+
pid: None,
308+
})
309+
}
310+
}

0 commit comments

Comments
 (0)