Skip to content

Commit 0d6baba

Browse files
committed
Enable preadv2 optimization on android
Signed-off-by: Jiahao XU <[email protected]>
1 parent f34c2bc commit 0d6baba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/unix.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl Client {
290290
//
291291
// TODO: musl libc supports preadv2 since 1.2.5, but `libc` crate
292292
// hasn't yet added it.
293-
#[cfg(target_os = "linux")]
293+
#[cfg(any(target_os = "linux", target_os = "android"))]
294294
{
295295
let read = self.read().as_raw_fd();
296296
loop {
@@ -397,7 +397,7 @@ impl Client {
397397

398398
// This should be available for all linux targets,
399399
// though only [`non_blocking_read`] currently uses it so adding gnu cfg.
400-
#[cfg(target_os = "linux")]
400+
#[cfg(any(target_os = "linux", target_os = "android"))]
401401
mod linux {
402402
use super::*;
403403

0 commit comments

Comments
 (0)