diff options
| author | Eunji Jeong <eun-ji.jeong@samsung.com> | 2015-01-26 14:46:21 +0900 |
|---|---|---|
| committer | Eunji Jeong <eun-ji.jeong@samsung.com> | 2015-02-10 15:48:07 +0900 |
| commit | d1e9a76326070bcb62684136089bb98e7f64db41 (patch) | |
| tree | 150a71e2a966e780e9e0dd2bec204d5f5250c3fa /src/libstd/sys | |
| parent | 5cbdf1db9bde6ffb8da4327974c2f5bb105c108a (diff) | |
| download | rust-d1e9a76326070bcb62684136089bb98e7f64db41.tar.gz rust-d1e9a76326070bcb62684136089bb98e7f64db41.zip | |
Fix aarch64 test issues (same level to arm32)
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/process.rs | 10 |
1 files changed, 9 insertions, 1 deletions
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<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); |
