mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user