Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions portable/ThirdParty/GCC/Posix/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you need this change? Are you seeing a redefinition warning? If so, what command are you using to run the Posix simulator?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some old gcc version complain with redefined warning. The second one with every gcc version and -Wundef: GCC/Posix/port.c:308:9: warning: "APPLE" is not defined, evaluates to 0 [-Wundef]

#define _GNU_SOURCE
#endif
#include "portmacro.h"
Expand Down Expand Up @@ -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 ) );
Expand Down
Loading