Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation warning about undelcared pthread_setname_np #1079

Merged
merged 8 commits into from
Jun 10, 2024

Conversation

maxiaogood
Copy link
Contributor

@maxiaogood maxiaogood commented Jun 5, 2024

Description

Use _GNU_SOURCE macro instead of __USE_GNU and define it before including portmacro.h. The reason is that portmacro.h includes limits.h which in-turn includes features.h - this results in __USE_GNU getting incorrectly undefined.

Test Steps

  1. use glibc2.24 and gcc 6.3.0 build sucess
  2. use glibc2.35 and gcc 11.3.0 build sucess

Checklist:

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

Related Issue

#1077

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

…able to be resolved due to the definition of __USE_GNU (FreeRTOS#1077)
@maxiaogood maxiaogood requested a review from a team as a code owner June 5, 2024 03:54
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@aggarg aggarg changed the title Resolve the issue of low version glibc and gcc compilation not being … Fix compilation warning about undelcared pthread_setname_np Jun 10, 2024
@aggarg aggarg merged commit bee9037 into FreeRTOS:main Jun 10, 2024
16 checks passed
@maxiaogood maxiaogood deleted the maxiao_posix branch June 12, 2024 02:21
AhmedIsmail02 pushed a commit to AhmedIsmail02/FreeRTOS-Kernel that referenced this pull request Jun 12, 2024
…#1079)

Use _GNU_SOURCE macro instead of __USE_GNU and define it before
including portmacro.h. The reason is that portmacro.h includes limits.h
which in-turn includes features.h - this results in __USE_GNU getting
incorrectly undefined.
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.

3 participants