Skip to content

Commit

Permalink
use socklen_t instead of u32 for bind() parameter
Browse files Browse the repository at this point in the history
this fix compilation on Android 32b, where socklen_t is i32
  • Loading branch information
trinity-1686a committed Mar 19, 2022
1 parent d05ebdd commit 0401bd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/phy/sys/raw_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl RawSocketDesc {
let res = libc::bind(
self.lower,
&sockaddr as *const libc::sockaddr_ll as *const libc::sockaddr,
mem::size_of::<libc::sockaddr_ll>() as u32,
mem::size_of::<libc::sockaddr_ll>() as libc::socklen_t,
);
if res == -1 {
return Err(io::Error::last_os_error());
Expand Down

0 comments on commit 0401bd2

Please sign in to comment.