Fix compilation warning about undelcared pthread_setname_np (#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.
This commit is contained in:
6
portable/ThirdParty/GCC/Posix/port.c
vendored
6
portable/ThirdParty/GCC/Posix/port.c
vendored
@ -49,12 +49,10 @@
|
||||
* only or serialized with a FreeRTOS primitive such as a binary
|
||||
* semaphore or mutex.
|
||||
*----------------------------------------------------------*/
|
||||
#include "portmacro.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#define __USE_GNU
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include "portmacro.h"
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <limits.h>
|
||||
|
Reference in New Issue
Block a user