summary refs log tree commit diff
path: root/src/libstd/path.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-06-20 11:35:34 -0700
committerbors <bors@rust-lang.org>2013-06-20 11:35:34 -0700
commitf348465283d6cd85b69bcdc1711d14985d154c39 (patch)
tree2bd582132e82b3b0acb879311394913144da1ea8 /src/libstd/path.rs
parentadeb7e77ccff938c0afb105a14a2ff4df4c7efc8 (diff)
parentb82370cec65b17456b1d5b98a283d3f46a8ab09a (diff)
downloadrust-f348465283d6cd85b69bcdc1711d14985d154c39.tar.gz
rust-f348465283d6cd85b69bcdc1711d14985d154c39.zip
auto merge of #7128 : yichoi/rust/fix_sometc, r=brson
- Fix stat struct for Android (found by SEGV at run-pass/stat.rs)
- Adjust some test cases to rpass for Android 
- Modify some script to rpass for Android
Diffstat (limited to 'src/libstd/path.rs')
-rw-r--r--src/libstd/path.rs30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 9c51526aa7f..d7812bf49c2 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -128,7 +128,6 @@ pub trait GenericPath {
 #[cfg(target_os = "android")]
 mod stat {
     #[cfg(target_arch = "x86")]
-    #[cfg(target_arch = "arm")]
     pub mod arch {
         use libc;
 
@@ -158,6 +157,35 @@ mod stat {
         }
     }
 
+    #[cfg(target_arch = "arm")]
+    pub mod arch {
+        use libc;
+
+        pub fn default_stat() -> libc::stat {
+            libc::stat {
+                st_dev: 0,
+                __pad0: [0, ..4],
+                __st_ino: 0,
+                st_mode: 0,
+                st_nlink: 0,
+                st_uid: 0,
+                st_gid: 0,
+                st_rdev: 0,
+                __pad3: [0, ..4],
+                st_size: 0,
+                st_blksize: 0,
+                st_blocks: 0,
+                st_atime: 0,
+                st_atime_nsec: 0,
+                st_mtime: 0,
+                st_mtime_nsec: 0,
+                st_ctime: 0,
+                st_ctime_nsec: 0,
+                st_ino: 0
+            }
+        }
+    }
+
     #[cfg(target_arch = "mips")]
     pub mod arch {
         use libc;