about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-02-17 19:35:12 +0000
committerbors <bors@rust-lang.org>2015-02-17 19:35:12 +0000
commit6c065fc8cb036785f61ff03e05c1563cbb2dd081 (patch)
tree9d5c813da4a4f24c177e10c9a38936fe0d014721 /src/libstd/sys
parentf9aeea7cb7865a2b82e7102837daabbe549177ea (diff)
parent194d96e5c3b3bf069ff791813641b7d22f4f42e9 (diff)
downloadrust-6c065fc8cb036785f61ff03e05c1563cbb2dd081.tar.gz
rust-6c065fc8cb036785f61ff03e05c1563cbb2dd081.zip
Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichton
- Now "make check-stage2-T-aarch64-linux-android-H-x86_64-unknown-linux-gnu" works (#21773)
- Fix & enable debuginfo tests for android (#10381)
- Fix & enable more tests for android (both for arm/aarch64)
- Enable many already-pass tests on android (both for arm/aarch64)
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/process.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs
index 32e45009887..f954024b0e9 100644
--- a/src/libstd/sys/unix/process.rs
+++ b/src/libstd/sys/unix/process.rs
@@ -70,7 +70,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 {
@@ -78,6 +77,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);