From 2944f8b5a2a7043d0e8c694d035a5323f01a8ef6 Mon Sep 17 00:00:00 2001 From: conectado Date: Mon, 11 Mar 2024 16:24:48 -0300 Subject: [PATCH] fix packet length check for android --- quinn-udp/src/unix.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quinn-udp/src/unix.rs b/quinn-udp/src/unix.rs index 93ff8b539..eba5a148f 100644 --- a/quinn-udp/src/unix.rs +++ b/quinn-udp/src/unix.rs @@ -46,7 +46,11 @@ impl UdpSocketState { pub fn new(sock: UdpSockRef<'_>) -> io::Result { 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::() as _) as usize }; }