From 4adcaa4423641a44df764058745274c522452ca5 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Tue, 18 Feb 2020 12:24:23 -0600 Subject: [PATCH] unix/mpthreadport: Fix Mac build by using SIGUSR1 if SIGRTMIN not avail. Some platforms, like Apple, don't define SIGRTMIN, so fall back to SIGUSR1 in such a case. Fixes #5659. --- ports/unix/mpthreadport.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/unix/mpthreadport.c b/ports/unix/mpthreadport.c index 4cbba3ff31..4ee6923418 100644 --- a/ports/unix/mpthreadport.c +++ b/ports/unix/mpthreadport.c @@ -39,7 +39,13 @@ #include #include +// Some platforms don't have SIGRTMIN but if we do have it, use it to avoid +// potential conflict with other uses of the more commonly used SIGUSR1. +#ifdef SIGRTMIN #define MP_THREAD_GC_SIGNAL (SIGRTMIN + 5) +#else +#define MP_THREAD_GC_SIGNAL (SIGUSR1) +#endif // this structure forms a linked list, one node per active thread typedef struct _thread_t {