Fix aarch64 test issues (same level to arm32)

This commit is contained in:
Eunji Jeong 2015-01-26 14:46:21 +09:00
parent 5cbdf1db9b
commit d1e9a76326
4 changed files with 12 additions and 3 deletions

View file

@ -64,7 +64,6 @@ impl Process {
K: BytesContainer + Eq + Hash<Hasher>, 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);