diff --git a/src/sync/sys/unix/net.rs b/src/sync/sys/unix/net.rs index 3fdf47b..8f724d6 100644 --- a/src/sync/sys/unix/net.rs +++ b/src/sync/sys/unix/net.rs @@ -62,7 +62,7 @@ impl PipeListener { } fn new_monitor_fd() -> Result<(i32, i32)> { - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "android"))] let fds = pipe2(nix::fcntl::OFlag::O_CLOEXEC)?; @@ -128,7 +128,7 @@ impl PipeListener { return Err(io::Error::new(io::ErrorKind::Other, "listener shutdown for quit flag")); } - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "android"))] let fd = match accept4(self.fd, SockFlag::SOCK_CLOEXEC) { Ok(fd) => fd, Err(e) => {