about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorTim JIANG <p90eri@gmail.com>2015-08-09 13:15:50 +0800
committerOvermind JIANG <p90eri@gmail.com>2015-08-23 15:38:11 +0800
commita1b2deb33b3d8f8e77567afbebdb4a3d27ee97ff (patch)
treefe7a50dc54fd4d3525d5888fad69433ece2bede9 /src/rt
parente617a17369ef403268adcebc5e3e32a0bb5cf04c (diff)
downloadrust-a1b2deb33b3d8f8e77567afbebdb4a3d27ee97ff.tar.gz
rust-a1b2deb33b3d8f8e77567afbebdb4a3d27ee97ff.zip
New cross target: i686-linux-android
- All the libstd tests are now passing in the optimized build against
  a Zenfone2 and the x86 Android simulator.
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_builtin.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.c b/src/rt/rust_builtin.c
index 9a5eaad4243..945057f8612 100644
--- a/src/rt/rust_builtin.c
+++ b/src/rt/rust_builtin.c
@@ -39,6 +39,13 @@ rust_list_dir_val(struct dirent* entry_ptr) {
     return entry_ptr->d_name;
 }
 
+// Android's struct dirent does have d_type from the very beginning
+// (android-3). _DIRENT_HAVE_D_TYPE is not defined all the way to android-21
+// though...
+#if defined(__ANDROID__)
+# define _DIRENT_HAVE_D_TYPE
+#endif
+
 int
 rust_dir_get_mode(struct dirent* entry_ptr) {
 #if defined(_DIRENT_HAVE_D_TYPE) || defined(__APPLE__)