diff options
-rw-r--r-- | lib/System/Unix/Signals.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/System/Unix/Signals.inc b/lib/System/Unix/Signals.inc index 7b7c43efc7..dcbda4e008 100644 --- a/lib/System/Unix/Signals.inc +++ b/lib/System/Unix/Signals.inc @@ -274,6 +274,10 @@ void llvm::sys::PrintStackTraceOnErrorSignal() { #ifdef __APPLE__ +int raise(int sig) { + return pthread_kill(pthread_self(), SIGABRT); +} + void __assert_rtn(const char *func, const char *file, int line, @@ -291,7 +295,7 @@ void __assert_rtn(const char *func, #include <pthread.h> void abort() { - pthread_kill(pthread_self(), SIGABRT); + raise(SIGABRT); usleep(1000); __builtin_trap(); } |