Skip to content

Support Android/x86 for liblibc #25475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/liblibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,11 @@ pub mod types {
pub type intmax_t = i64;
pub type uintmax_t = u64;
}
#[cfg(any(target_arch = "x86",
target_arch = "mips",
#[cfg(any(target_arch = "mips",
target_arch = "mipsel",
target_arch = "powerpc",
target_arch = "le32",
all(target_arch = "arm", not(target_os = "android"))))]
all(any(target_arch = "arm", target_arch = "x86"), not(target_os = "android"))))]
pub mod posix88 {
pub type off_t = i32;
pub type dev_t = u64;
Expand All @@ -449,7 +448,7 @@ pub mod types {
pub type mode_t = u32;
pub type ssize_t = i32;
}
#[cfg(all(target_arch = "arm", target_os = "android"))]
#[cfg(all(any(target_arch = "arm", target_arch = "x86"), target_os = "android"))]
pub mod posix88 {
pub type off_t = i32;
pub type dev_t = u32;
Expand All @@ -464,7 +463,7 @@ pub mod types {
#[cfg(any(target_arch = "x86",
target_arch = "le32",
target_arch = "powerpc",
all(target_arch = "arm", not(target_os = "android"))))]
all(any(target_arch = "arm", target_arch = "x86"), not(target_os = "android"))))]
pub mod posix01 {
use types::os::arch::c95::{c_short, c_long, time_t};
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
Expand Down Expand Up @@ -510,7 +509,7 @@ pub mod types {
pub __size: [u32; 9]
}
}
#[cfg(all(target_arch = "arm", target_os = "android"))]
#[cfg(all(any(target_arch = "arm", target_arch = "x86"), target_os = "android"))]
pub mod posix01 {
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
use types::os::arch::c99::{c_longlong, c_ulonglong};
Expand Down Expand Up @@ -5905,13 +5904,13 @@ pub mod funcs {
use types::os::arch::c95::c_int;
use types::os::common::posix01::sighandler_t;

#[cfg(not(all(target_os = "android", target_arch = "arm")))]
#[cfg(not(all(target_os = "android", any(target_arch = "arm", target_arch = "x86"))))]
extern {
pub fn signal(signum: c_int,
handler: sighandler_t) -> sighandler_t;
}

#[cfg(all(target_os = "android", target_arch = "arm"))]
#[cfg(all(target_os = "android", any(target_arch = "arm", target_arch = "x86")))]
extern {
#[link_name = "bsd_signal"]
pub fn signal(signum: c_int,
Expand Down