Skip to content

Commit

Permalink
fix packet length check for android
Browse files Browse the repository at this point in the history
  • Loading branch information
conectado authored and Ralith committed Mar 11, 2024
1 parent 096550a commit 2944f8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion quinn-udp/src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ impl UdpSocketState {
pub fn new(sock: UdpSockRef<'_>) -> io::Result<Self> {
let io = sock.0;
let mut cmsg_platform_space = 0;
if cfg!(target_os = "linux") || cfg!(target_os = "freebsd") || cfg!(target_os = "macos") {
if cfg!(target_os = "linux")
|| cfg!(target_os = "freebsd")
|| cfg!(target_os = "macos")
|| cfg!(target_os = "android")
{
cmsg_platform_space +=
unsafe { libc::CMSG_SPACE(mem::size_of::<libc::in6_pktinfo>() as _) as usize };
}
Expand Down

0 comments on commit 2944f8b

Please sign in to comment.