From d1e9a76326070bcb62684136089bb98e7f64db41 Mon Sep 17 00:00:00 2001 From: Eunji Jeong Date: Mon, 26 Jan 2015 14:46:21 +0900 Subject: Fix aarch64 test issues (same level to arm32) --- src/libstd/sys/unix/process.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs index 52a8ac9c338..bc13fa3122b 100644 --- a/src/libstd/sys/unix/process.rs +++ b/src/libstd/sys/unix/process.rs @@ -64,7 +64,6 @@ impl Process { K: BytesContainer + Eq + Hash, V: BytesContainer { use libc::funcs::posix88::unistd::{fork, dup2, close, chdir, execvp}; - use libc::funcs::bsd44::getdtablesize; mod rustrt { extern { @@ -72,6 +71,15 @@ impl Process { } } + #[cfg(all(target_os = "android", target_arch = "aarch64"))] + unsafe fn getdtablesize() -> c_int { + libc::sysconf(libc::consts::os::sysconf::_SC_OPEN_MAX) as c_int + } + #[cfg(not(all(target_os = "android", target_arch = "aarch64")))] + unsafe fn getdtablesize() -> c_int { + libc::funcs::bsd44::getdtablesize() + } + unsafe fn set_cloexec(fd: c_int) { let ret = c::ioctl(fd, c::FIOCLEX); assert_eq!(ret, 0); -- cgit 1.4.1-3-g733a5