From a1b2deb33b3d8f8e77567afbebdb4a3d27ee97ff Mon Sep 17 00:00:00 2001 From: Tim JIANG Date: Sun, 9 Aug 2015 13:15:50 +0800 Subject: 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. --- src/rt/rust_builtin.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/rt') 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__) -- cgit 1.4.1-3-g733a5