diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index c96a5c8da8..0846eaf52a 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -630,6 +630,11 @@ pub unsafe fn sockaddr_storage_to_addr( consts::AF_UNIX => { Ok(SockAddr::Unix(UnixAddr(*(addr as *const _ as *const sockaddr_un), len))) } + #[cfg(any(target_os = "linux", target_os = "android"))] + consts::AF_NETLINK => { + use libc::sockaddr_nl; + Ok(SockAddr::Netlink(NetlinkAddr(*(addr as *const _ as *const sockaddr_nl)))) + } af => panic!("unexpected address family {}", af), } }