From 1f2d896b9692f138e4c0cfa116deb4d34ab893ea Mon Sep 17 00:00:00 2001 From: Tim Ryan Date: Sat, 17 Sep 2016 23:50:58 +0200 Subject: [PATCH] Removes SIGSTKFLT when cross-compiling to MIPS. --- src/sys/signal.rs | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 18827332bc..bdc25b47e6 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -28,7 +28,7 @@ pub enum Signal { SIGPIPE = libc::SIGPIPE, SIGALRM = libc::SIGALRM, SIGTERM = libc::SIGTERM, - #[cfg(any(target_os = "linux", target_os = "android", target_os = "emscripten"))] + #[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(target_arch = "mips")))] SIGSTKFLT = libc::SIGSTKFLT, SIGCHLD = libc::SIGCHLD, SIGCONT = libc::SIGCONT, @@ -54,7 +54,7 @@ pub enum Signal { pub use self::Signal::*; -#[cfg(any(target_os = "linux", target_os = "android", target_os = "emscripten"))] +#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(target_arch = "mips")))] const SIGNALS: [Signal; 31] = [ SIGHUP, SIGINT, @@ -87,6 +87,38 @@ const SIGNALS: [Signal; 31] = [ SIGIO, SIGPWR, SIGSYS]; +#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), target_arch = "mips"))] +const SIGNALS: [Signal; 30] = [ + SIGHUP, + SIGINT, + SIGQUIT, + SIGILL, + SIGTRAP, + SIGABRT, + SIGBUS, + SIGFPE, + SIGKILL, + SIGUSR1, + SIGSEGV, + SIGUSR2, + SIGPIPE, + SIGALRM, + SIGTERM, + SIGCHLD, + SIGCONT, + SIGSTOP, + SIGTSTP, + SIGTTIN, + SIGTTOU, + SIGURG, + SIGXCPU, + SIGXFSZ, + SIGVTALRM, + SIGPROF, + SIGWINCH, + SIGIO, + SIGPWR, + SIGSYS]; #[cfg(not(any(target_os = "linux", target_os = "android", target_os = "emscripten")))] const SIGNALS: [Signal; 31] = [ SIGHUP,