Skip to content

Commit

Permalink
Fix android build
Browse files Browse the repository at this point in the history
Signed-off-by: Dustin Thomson <[email protected]>
  • Loading branch information
powturns committed Apr 1, 2024
1 parent 6f12d9c commit 4b312f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sync/sys/unix/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;


Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 4b312f6

Please sign in to comment.