Skip to content

Commit

Permalink
Fix for Rust 1.63
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmehall committed Apr 28, 2024
1 parent 013792a commit f2b3389
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 0 additions & 3 deletions src/backend/libc/net/addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ use {
core::slice,
};

use super::write_sockaddr::{encode_sockaddr_v4, encode_sockaddr_v6};
use crate::net::{SocketAddrV4, SocketAddrV6, SocketAddress};

/// `struct sockaddr_un`
#[cfg(unix)]
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion src/backend/libc/net/msghdr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub(crate) fn with_msghdr<R>(
addr.with_sockaddr(|addr_ptr, addr_len| {
f({
let mut h = zero_msghdr();
h.msg_name = addr_ptr.cast_mut().cast();
h.msg_name = addr_ptr as *mut _;
h.msg_namelen = addr_len;
h.msg_iov = iov.as_ptr() as _;
h.msg_iovlen = msg_iov_len(iov.len());
Expand Down
12 changes: 6 additions & 6 deletions src/backend/linux_raw/net/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ pub(crate) fn sendto(
buf_addr,
buf_len,
flags,
raw_arg(addr_ptr.cast_mut().cast()),
raw_arg(addr_ptr as *mut _),
socklen_t(addr_len)
))
}
Expand All @@ -440,7 +440,7 @@ pub(crate) fn sendto(
buf_addr,
buf_len,
flags.into(),
raw_arg(addr_ptr.cast_mut().cast()),
raw_arg(addr_ptr as *mut _),
socklen_t(addr_len)
])
))
Expand Down Expand Up @@ -626,7 +626,7 @@ pub(crate) fn bind(fd: BorrowedFd<'_>, addr: &impl SocketAddress) -> io::Result<
ret(syscall_readonly!(
__NR_bind,
fd,
raw_arg(addr_ptr.cast_mut().cast()),
raw_arg(addr_ptr as *mut _),
socklen_t(addr_len)
))
}
Expand All @@ -637,7 +637,7 @@ pub(crate) fn bind(fd: BorrowedFd<'_>, addr: &impl SocketAddress) -> io::Result<
x86_sys(SYS_BIND),
slice_just_addr::<ArgReg<'_, SocketArg>, _>(&[
fd.into(),
raw_arg(addr_ptr.cast_mut().cast()),
raw_arg(addr_ptr as *mut _),
socklen_t(addr_len)
])
))
Expand All @@ -653,7 +653,7 @@ pub(crate) fn connect(fd: BorrowedFd<'_>, addr: &impl SocketAddress) -> io::Resu
ret(syscall_readonly!(
__NR_connect,
fd,
raw_arg(addr_ptr.cast_mut().cast()),
raw_arg(addr_ptr as *mut _),
socklen_t(addr_len)
))
}
Expand All @@ -664,7 +664,7 @@ pub(crate) fn connect(fd: BorrowedFd<'_>, addr: &impl SocketAddress) -> io::Resu
x86_sys(SYS_CONNECT),
slice_just_addr::<ArgReg<'_, SocketArg>, _>(&[
fd.into(),
raw_arg(addr_ptr.cast_mut().cast()),
raw_arg(addr_ptr as *mut _),
socklen_t(addr_len)
])
))
Expand Down

0 comments on commit f2b3389

Please sign in to comment.