From bfbda8110720d3a467b2c791bcaa18531df43a3a Mon Sep 17 00:00:00 2001 From: Tomoaki Kawada Date: Mon, 1 Aug 2022 15:19:25 +0900 Subject: [PATCH] kmc-solid: Adapt to a recent change in the `IntoInner` impl of `SocketAddr` `(x: SocketAddr).into_inner()` evaluates to `(SocketAddrCRepr, socklen_t)` instead of `(*const sockaddr, socklen_t)` as of commit 55e23db13. --- library/std/src/sys/solid/net.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std/src/sys/solid/net.rs b/library/std/src/sys/solid/net.rs index faeda5a854d..1b98ef993b0 100644 --- a/library/std/src/sys/solid/net.rs +++ b/library/std/src/sys/solid/net.rs @@ -230,8 +230,8 @@ pub fn new_raw(fam: c_int, ty: c_int) -> io::Result { pub fn connect_timeout(&self, addr: &SocketAddr, timeout: Duration) -> io::Result<()> { self.set_nonblocking(true)?; let r = unsafe { - let (addrp, len) = addr.into_inner(); - cvt(netc::connect(self.0.raw(), addrp, len)) + let (addr, len) = addr.into_inner(); + cvt(netc::connect(self.0.raw(), addr.as_ptr(), len)) }; self.set_nonblocking(false)?;