net: fix GET_BUF_SIZE constant for target_os = "android" (#7889)

We recently tried to upgrade Android to the newest tokio, but tests that
use these constants fail, since Android is provided the non-Linux
constants.
This commit is contained in:
George Burgess IV
2026-02-06 15:08:04 +01:00
committed by GitHub
parent 306ed1c30b
commit d89e998922
+2 -2
View File
@@ -123,10 +123,10 @@ const SET_BUF_SIZE: u32 = 4096;
// Linux doubles the buffer size for kernel usage, and exposes that when
// retrieving the buffer size.
#[cfg(not(target_os = "linux"))]
#[cfg(not(any(target_os = "android", target_os = "linux")))]
const GET_BUF_SIZE: u32 = SET_BUF_SIZE;
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "android", target_os = "linux"))]
const GET_BUF_SIZE: u32 = 2 * SET_BUF_SIZE;
test!(keepalive, set_keepalive(true));