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.
pull/1082/head^2
maxiao 8 months ago committed by GitHub
parent c431b358c8
commit bee9037c46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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>

Loading…
Cancel
Save