From d005c05f1ea08eb735e417963462aae638386fba Mon Sep 17 00:00:00 2001 From: Claudio Lanconelli Date: Thu, 23 Jul 2026 15:16:40 +0200 Subject: [PATCH] fix warning in pc posix simulator Avoid _GNU_SOURCE redefined warning, and fix #ifdef __APPLE__ --- portable/ThirdParty/GCC/Posix/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index a1b1ca8c7cf..9705784b539 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -54,7 +54,7 @@ * done by adding the following line to ~/.lldbinit: * `process handle SIGUSR1 -n true -p false -s false` *----------------------------------------------------------*/ -#ifdef __linux__ +#if defined(__linux__) && !defined(_GNU_SOURCE) #define _GNU_SOURCE #endif #include "portmacro.h" @@ -305,7 +305,7 @@ BaseType_t xPortStartScheduler( void ) /* Reset pthread_once_t, needed to restart the scheduler again. * memset the internal struct members for MacOS/Linux Compatibility */ - #if __APPLE__ + #ifdef __APPLE__ hSigSetupThread.__sig = _PTHREAD_ONCE_SIG_init; hThreadKeyOnce.__sig = _PTHREAD_ONCE_SIG_init; memset( ( void * ) &hSigSetupThread.__opaque, 0, sizeof( hSigSetupThread.__opaque ) );