Skip to content

Commit

Permalink
Resolve the issue of low version glibc and gcc compilation not being …
Browse files Browse the repository at this point in the history
…able to be resolved due to the definition of __USE_GNU (FreeRTOS#1077)
  • Loading branch information
maxiao committed Jun 5, 2024
1 parent 65e6297 commit e31d0ba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions portable/ThirdParty/GCC/Posix/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
*----------------------------------------------------------*/
#include "portmacro.h"

#ifdef __linux__
#define __USE_GNU
#endif

#include <errno.h>
#include <pthread.h>
Expand All @@ -64,6 +61,7 @@
#include <string.h>
#include <sys/time.h>
#include <sys/times.h>
#include <sys/prctl.h>
#include <time.h>
#include <unistd.h>

Expand Down Expand Up @@ -141,7 +139,7 @@ static void prvPortSetCurrentThreadName(char * pxThreadName)
#ifdef __APPLE__
pthread_setname_np(pxThreadName);
#else
pthread_setname_np(pthread_self(), pxThreadName);
prctl( PR_SET_NAME, pxThreadName );
#endif
}
/*-----------------------------------------------------------*/
Expand Down

0 comments on commit e31d0ba

Please sign in to comment.