From 82364ccaaac329ed08bf72ef35eb4c08e8df4d4a Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Tue, 24 Jun 2014 01:28:30 +0200 Subject: [PATCH] Use SIGPROF only if it is available The SIGPROF signal is an XSI option and obsolescent in XSI. POSIX systems are not required to have it. This change is released under the MIT/X11 license. --- mono/mini/mini-posix.c | 2 ++ support/old-map.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mono/mini/mini-posix.c b/mono/mini/mini-posix.c index 67f5725de6a..d26b4af4e92 100644 --- a/mono/mini/mini-posix.c +++ b/mono/mini/mini-posix.c @@ -296,6 +296,7 @@ SIG_HANDLER_FUNC (static, sigusr1_signal_handler) #define FULL_STAT_PROFILER_BACKTRACE 0 #endif +#ifdef SIGPROF #if defined(__ia64__) || defined(__sparc__) || defined(sparc) || defined(__s390__) || defined(s390) SIG_HANDLER_FUNC (static, sigprof_signal_handler) @@ -384,6 +385,7 @@ SIG_HANDLER_FUNC (static, sigprof_signal_handler) mono_chain_signal (SIG_HANDLER_PARAMS); } +#endif #endif SIG_HANDLER_FUNC (static, sigquit_signal_handler) diff --git a/support/old-map.c b/support/old-map.c index 9b2a2e907d7..8d733b21cc7 100644 --- a/support/old-map.c +++ b/support/old-map.c @@ -155,8 +155,10 @@ int map_Mono_Posix_Signals (int x) return SIGXFSZ; if (x == Mono_Posix_Signals_SIGVTALRM) return SIGVTALRM; +#ifdef SIGPROF if (x == Mono_Posix_Signals_SIGPROF) return SIGPROF; +#endif if (x == Mono_Posix_Signals_SIGWINCH) return SIGWINCH; #ifdef SIGIO -- 2.25.1