Skip to content

Commit 6cf4d5b

Browse files
authored
Merge pull request #224 from powturns/master
Fix android build
2 parents 9d7f90f + b5cbdcc commit 6cf4d5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sync/sys/unix/net.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl PipeListener {
6565
}
6666

6767
fn new_monitor_fd() -> Result<(i32, i32)> {
68-
#[cfg(target_os = "linux")]
68+
#[cfg(any(target_os = "linux", target_os = "android"))]
6969
let fds = pipe2(nix::fcntl::OFlag::O_CLOEXEC)?;
7070

7171

@@ -131,7 +131,7 @@ impl PipeListener {
131131
return Err(io::Error::new(io::ErrorKind::Other, "listener shutdown for quit flag"));
132132
}
133133

134-
#[cfg(target_os = "linux")]
134+
#[cfg(any(target_os = "linux", target_os = "android"))]
135135
let fd = match accept4(self.fd, SockFlag::SOCK_CLOEXEC) {
136136
Ok(fd) => fd,
137137
Err(e) => {

0 commit comments

Comments
 (0)