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.
This commit is contained in:
Tomoaki Kawada 2022-08-01 15:19:25 +09:00
parent 6423ab3a75
commit bfbda81107

View File

@ -230,8 +230,8 @@ pub fn new_raw(fam: c_int, ty: c_int) -> io::Result<Socket> {
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)?;