This commit is contained in:
Claudio Lanconelli 2026-08-27 15:36:48 +08:00 • committed by GitHub
commit 87dfd3d310
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,7 +54,7 @@
* done by adding the following line to ~/.lldbinit: * done by adding the following line to ~/.lldbinit:
* `process handle SIGUSR1 -n true -p false -s false` * `process handle SIGUSR1 -n true -p false -s false`
*----------------------------------------------------------*/ *----------------------------------------------------------*/
#ifdef __linux__ #if defined(__linux__) && !defined(_GNU_SOURCE)
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
#include "portmacro.h" #include "portmacro.h"
@ -305,7 +305,7 @@ BaseType_t xPortStartScheduler( void )
/* Reset pthread_once_t, needed to restart the scheduler again. /* Reset pthread_once_t, needed to restart the scheduler again.
* memset the internal struct members for MacOS/Linux Compatibility */ * memset the internal struct members for MacOS/Linux Compatibility */
#if __APPLE__ #ifdef __APPLE__
hSigSetupThread.__sig = _PTHREAD_ONCE_SIG_init; hSigSetupThread.__sig = _PTHREAD_ONCE_SIG_init;
hThreadKeyOnce.__sig = _PTHREAD_ONCE_SIG_init; hThreadKeyOnce.__sig = _PTHREAD_ONCE_SIG_init;
memset( ( void * ) &hSigSetupThread.__opaque, 0, sizeof( hSigSetupThread.__opaque ) ); memset( ( void * ) &hSigSetupThread.__opaque, 0, sizeof( hSigSetupThread.__opaque ) );