Skip to content

fix warning in pc posix simulator#1456

Open
lancos wants to merge 1 commit into
FreeRTOS:mainfrom
lancos:patch-1
Open

fix warning in pc posix simulator#1456
lancos wants to merge 1 commit into
FreeRTOS:mainfrom
lancos:patch-1

Conversation

@lancos

@lancos lancos commented Jul 23, 2026

Copy link
Copy Markdown

Avoid _GNU_SOURCE redefined warning, and fix #ifdef APPLE

Description

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Avoid _GNU_SOURCE redefined warning, and fix #ifdef __APPLE__
@sonarqubecloud

Copy link
Copy Markdown

* `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]

@kstribrnAmzn

Copy link
Copy Markdown
Member

How did you verify your change? I'm assuming you must have ran the Posix simulator to have seen these issues.

@lancos

lancos commented Jul 23, 2026

Copy link
Copy Markdown
Author

How did you verify your change? I'm assuming you must have ran the Posix simulator to have seen these issues.

Yes, I started to use the posix simulator in my projects several years ago, it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants