From c5bc33200c8eb3563784c0e18dc37060049247cd Mon Sep 17 00:00:00 2001 From: kennytm Date: Sat, 14 Mar 2015 04:34:24 +0800 Subject: Amend some files to make it compile on arm-linux-androideabi. --- src/unistd.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/unistd.rs') 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(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; -- cgit v1.2.3