diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index fdb556d04..6a7837d79 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -51,9 +51,6 @@ *----------------------------------------------------------*/ #include "portmacro.h" -#ifdef __linux__ - #define __USE_GNU -#endif #include #include @@ -64,6 +61,7 @@ #include #include #include +#include #include #include @@ -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 } /*-----------------------------------------------------------*/