summaryrefslogtreecommitdiff
path: root/src/unistd.rs
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2015-03-14 04:34:24 +0800
committerCarl Lerche <me@carllerche.com>2015-03-13 16:40:28 -0700
commitc5bc33200c8eb3563784c0e18dc37060049247cd (patch)
tree8715258b03eef8fcc6a62c82582b537ccb219e44 /src/unistd.rs
parent386dfd6f4770770b7721e7fa5195b4c993aa3e4b (diff)
downloadnix-c5bc33200c8eb3563784c0e18dc37060049247cd.zip
Amend some files to make it compile on arm-linux-androideabi.
Diffstat (limited to 'src/unistd.rs')
-rw-r--r--src/unistd.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unistd.rs b/src/unistd.rs
index a54bba3a..d07a170a 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -8,7 +8,7 @@ use libc::{c_char, c_void, c_int, size_t, pid_t, off_t};
use std::{mem, ptr};
use std::ffi::CString;
-#[cfg(target_os = "linux")]
+#[cfg(any(target_os = "linux", target_os = "android"))]
pub use self::linux::*;
mod ffi {
@@ -245,7 +245,7 @@ pub fn pipe() -> NixResult<(Fd, Fd)> {
}
}
-#[cfg(target_os = "linux")]
+#[cfg(any(target_os = "linux", target_os = "android"))]
pub fn pipe2(flags: OFlag) -> NixResult<(Fd, Fd)> {
type F = unsafe extern "C" fn(fds: *mut c_int, flags: c_int) -> c_int;
@@ -354,7 +354,7 @@ pub fn unlink<P: ?Sized + NixPath>(path: &P) -> NixResult<()> {
from_ffi(res)
}
-#[cfg(target_os = "linux")]
+#[cfg(any(target_os = "linux", target_os = "android"))]
mod linux {
use sys::syscall::{syscall, SYSPIVOTROOT};
use errno::Errno;