Add is_unnamed on redox

This commit is contained in:
jD91mZM2
2018-06-27 18:37:44 +02:00
parent 79bf00f406
commit c986310757
3 changed files with 58 additions and 24 deletions

View File

@@ -54,7 +54,8 @@ pub struct SocketAddr {
}
impl SocketAddr {
pub(crate) fn new<F>(f: F) -> io::Result<SocketAddr>
#[stable(feature = "unix_socket", since = "1.10.0")]
pub fn new<F>(f: F) -> io::Result<SocketAddr>
where F: FnOnce(*mut libc::sockaddr, *mut libc::socklen_t) -> libc::c_int
{
unsafe {
@@ -65,7 +66,8 @@ impl SocketAddr {
}
}
pub(crate) fn from_parts(addr: libc::sockaddr_un, mut len: libc::socklen_t)
#[stable(feature = "unix_socket", since = "1.10.0")]
pub fn from_parts(addr: libc::sockaddr_un, mut len: libc::socklen_t)
-> io::Result<SocketAddr>
{
if len == 0 {