From 0401bd2a6334a1b101642d5d227a85b2f904bd6e Mon Sep 17 00:00:00 2001 From: trinity-1686a Date: Sat, 19 Mar 2022 14:14:38 +0100 Subject: [PATCH] use socklen_t instead of u32 for bind() parameter this fix compilation on Android 32b, where socklen_t is i32 --- src/phy/sys/raw_socket.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phy/sys/raw_socket.rs b/src/phy/sys/raw_socket.rs index f9654d509..951f358dd 100644 --- a/src/phy/sys/raw_socket.rs +++ b/src/phy/sys/raw_socket.rs @@ -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::() as u32, + mem::size_of::() as libc::socklen_t, ); if res == -1 { return Err(io::Error::last_os_error());