Skip to content

Commit 29938ff

Browse files
committed
Fix struct stat on arm linux
1 parent 3b3bb0e commit 29938ff

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/liblibc/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,8 @@ pub mod types {
386386
target_arch = "mips",
387387
target_arch = "mipsel",
388388
target_arch = "powerpc",
389-
target_arch = "le32"))]
389+
target_arch = "le32",
390+
all(target_arch = "arm", not(target_os = "android"))))]
390391
pub mod posix88 {
391392
pub type off_t = i32;
392393
pub type dev_t = u64;
@@ -398,7 +399,7 @@ pub mod types {
398399
pub type mode_t = u32;
399400
pub type ssize_t = i32;
400401
}
401-
#[cfg(target_arch = "arm")]
402+
#[cfg(all(target_arch = "arm", target_os = "android"))]
402403
pub mod posix88 {
403404
pub type off_t = i32;
404405
pub type dev_t = u32;
@@ -412,7 +413,8 @@ pub mod types {
412413
}
413414
#[cfg(any(target_arch = "x86",
414415
target_arch = "le32",
415-
target_arch = "powerpc"))]
416+
target_arch = "powerpc",
417+
all(target_arch = "arm", not(target_os = "android"))))]
416418
pub mod posix01 {
417419
use types::os::arch::c95::{c_short, c_long, time_t};
418420
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
@@ -458,7 +460,7 @@ pub mod types {
458460
pub __size: [u32; 9]
459461
}
460462
}
461-
#[cfg(target_arch = "arm")]
463+
#[cfg(all(target_arch = "arm", target_os = "android"))]
462464
pub mod posix01 {
463465
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
464466
use types::os::arch::c99::{c_longlong, c_ulonglong};

0 commit comments

Comments
 (0)