Skip to content

Commit 11ec95b

Browse files
makotokatoOliver Schneider
authored and
Oliver Schneider
committed
Support Android/x86 for liblibc
All types are same as Android/arm. So I add condition for Android/x86
1 parent daaf715 commit 11ec95b

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/liblibc/lib.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,12 @@ pub mod types {
432432
pub type intmax_t = i64;
433433
pub type uintmax_t = u64;
434434
}
435-
#[cfg(any(target_arch = "x86",
436-
target_arch = "mips",
435+
#[cfg(any(target_arch = "mips",
437436
target_arch = "mipsel",
438437
target_arch = "powerpc",
439438
target_arch = "le32",
440-
all(target_arch = "arm", not(target_os = "android"))))]
439+
all(any(target_arch = "arm", target_arch = "x86"),
440+
not(target_os = "android"))))]
441441
pub mod posix88 {
442442
pub type off_t = i32;
443443
pub type dev_t = u64;
@@ -449,7 +449,8 @@ pub mod types {
449449
pub type mode_t = u32;
450450
pub type ssize_t = i32;
451451
}
452-
#[cfg(all(target_arch = "arm", target_os = "android"))]
452+
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
453+
target_os = "android"))]
453454
pub mod posix88 {
454455
pub type off_t = i32;
455456
pub type dev_t = u32;
@@ -464,7 +465,8 @@ pub mod types {
464465
#[cfg(any(target_arch = "x86",
465466
target_arch = "le32",
466467
target_arch = "powerpc",
467-
all(target_arch = "arm", not(target_os = "android"))))]
468+
all(any(target_arch = "arm", target_arch = "x86"),
469+
not(target_os = "android"))))]
468470
pub mod posix01 {
469471
use types::os::arch::c95::{c_short, c_long, time_t};
470472
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
@@ -510,7 +512,8 @@ pub mod types {
510512
pub __size: [u32; 9]
511513
}
512514
}
513-
#[cfg(all(target_arch = "arm", target_os = "android"))]
515+
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
516+
target_os = "android"))]
514517
pub mod posix01 {
515518
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
516519
use types::os::arch::c99::{c_longlong, c_ulonglong};
@@ -5905,13 +5908,15 @@ pub mod funcs {
59055908
use types::os::arch::c95::c_int;
59065909
use types::os::common::posix01::sighandler_t;
59075910

5908-
#[cfg(not(all(target_os = "android", target_arch = "arm")))]
5911+
#[cfg(not(all(target_os = "android", any(target_arch = "arm",
5912+
target_arch = "x86"))))]
59095913
extern {
59105914
pub fn signal(signum: c_int,
59115915
handler: sighandler_t) -> sighandler_t;
59125916
}
59135917

5914-
#[cfg(all(target_os = "android", target_arch = "arm"))]
5918+
#[cfg(all(target_os = "android", any(target_arch = "arm",
5919+
target_arch = "x86")))]
59155920
extern {
59165921
#[link_name = "bsd_signal"]
59175922
pub fn signal(signum: c_int,

0 commit comments

Comments
 (0)