diff options
Diffstat (limited to 'src/sys/signal.rs')
-rw-r--r-- | src/sys/signal.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/sys/signal.rs b/src/sys/signal.rs index e7978052..ee952369 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -198,6 +198,7 @@ pub const SIGIOT : Signal = SIGABRT; pub const SIGPOLL : Signal = SIGIO; pub const SIGUNUSED : Signal = SIGSYS; +#[cfg(not(target_os = "android"))] libc_bitflags!{ pub flags SaFlags: libc::c_int { SA_NOCLDSTOP, @@ -210,6 +211,35 @@ libc_bitflags!{ } } +// On 64-bit android, sa_flags is c_uint while on 32-bit android, it is +// c_ulong. +// FIXME: https://github.com/rust-lang/libc/pull/511 +#[cfg(all(target_os = "android", target_pointer_width = "32"))] +libc_bitflags!{ + pub flags SaFlags: libc::c_ulong { + SA_NOCLDSTOP as libc::c_ulong, + SA_NOCLDWAIT as libc::c_ulong, + SA_NODEFER as libc::c_ulong, + SA_ONSTACK as libc::c_ulong, + SA_RESETHAND as libc::c_ulong, + SA_RESTART as libc::c_ulong, + SA_SIGINFO as libc::c_ulong, + } +} + +#[cfg(all(target_os = "android", target_pointer_width = "64"))] +libc_bitflags!{ + pub flags SaFlags: libc::c_uint { + SA_NOCLDSTOP as libc::c_uint, + SA_NOCLDWAIT as libc::c_uint, + SA_NODEFER as libc::c_uint, + SA_ONSTACK as libc::c_uint, + SA_RESETHAND as libc::c_uint, + SA_RESTART as libc::c_uint, + SA_SIGINFO as libc::c_uint, + } +} + #[repr(i32)] #[derive(Clone, Copy, PartialEq)] pub enum SigmaskHow { |