diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index 6a7837d79..fdb556d04 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -51,6 +51,9 @@ *----------------------------------------------------------*/ #include "portmacro.h" +#ifdef __linux__ + #define __USE_GNU +#endif #include #include @@ -61,7 +64,6 @@ #include #include #include -#include #include #include @@ -139,7 +141,7 @@ static void prvPortSetCurrentThreadName(char * pxThreadName) #ifdef __APPLE__ pthread_setname_np(pxThreadName); #else - prctl( PR_SET_NAME, pxThreadName ); + pthread_setname_np(pthread_self(), pxThreadName); #endif } /*-----------------------------------------------------------*/