Skip to content

Commit 828e169

Browse files
committed
tests: fix constants for target_os = "android"
We recently tried to upgrade to the newest tokio, but tests that uses the constants are failing since Andorid is lumped in with non-Linux. A slight adjustment fixes that.
1 parent c0943f9 commit 828e169

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tokio/tests/tcp_socket.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ const SET_BUF_SIZE: u32 = 4096;
123123
// Linux doubles the buffer size for kernel usage, and exposes that when
124124
// retrieving the buffer size.
125125

126-
#[cfg(not(target_os = "linux"))]
126+
#[cfg(not(any(target_os = "android", target_os = "linux")))]
127127
const GET_BUF_SIZE: u32 = SET_BUF_SIZE;
128128

129-
#[cfg(target_os = "linux")]
129+
#[cfg(any(target_os = "android", target_os = "linux"))]
130130
const GET_BUF_SIZE: u32 = 2 * SET_BUF_SIZE;
131131

132132
test!(keepalive, set_keepalive(true));

0 commit comments

Comments
 (0)