From 4bb54a3cdc72c4202abc96794fb8ed5f43aed977 Mon Sep 17 00:00:00 2001 From: John Boiles Date: Mon, 10 Feb 2025 10:50:37 -0800 Subject: [PATCH] Add #if __APPLE__ to lldb workaround --- portable/ThirdParty/GCC/Posix/port.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index 7e82200b3..ac45b7d69 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -288,15 +288,18 @@ BaseType_t xPortStartScheduler( void ) { sigwait( &xSignals, &iSignal ); - /* For some reason, sigwait() doesn't always clear the signal the first time. - * Clear it again if it's still pending. - */ - sigset_t set; - sigpending( &set ); - if( sigismember( &set, SIG_RESUME ) ) - { - sigwait( &xSignals, &iSignal ); - } + #if __APPLE__ + /* For some reason, on macOS when running in LLDB, sigwait() doesn't + * always clear the signal the first time. Clear it again if it's still + * pending. + */ + sigset_t set; + sigpending( &set ); + if( sigismember( &set, SIG_RESUME ) ) + { + sigwait( &xSignals, &iSignal ); + } + #endif /* __APPLE__ */ } /*