Skip to content

Commit

Permalink
Enable preadv2 optimization on android
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
  • Loading branch information
NobodyXu committed Apr 22, 2024
1 parent f34c2bc commit 0d6baba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl Client {
//
// TODO: musl libc supports preadv2 since 1.2.5, but `libc` crate
// hasn't yet added it.
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "android"))]
{
let read = self.read().as_raw_fd();
loop {
Expand Down Expand Up @@ -397,7 +397,7 @@ impl Client {

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

Expand Down

0 comments on commit 0d6baba

Please sign in to comment.