Don't check for __linux__ specifically, check for PR_SET_NAME feature instead
Signed-off-by: Giel van Schijndel <me@mortis.eu>
This commit is contained in:
parent
304ca95508
commit
b277b0f100
1 changed files with 1 additions and 1 deletions
|
@ -1279,7 +1279,7 @@ void runCommand(std::string strCommand)
|
||||||
|
|
||||||
void RenameThread(const char* name)
|
void RenameThread(const char* name)
|
||||||
{
|
{
|
||||||
#if defined(__linux__) && defined(PR_SET_NAME)
|
#if defined(PR_SET_NAME)
|
||||||
// Only the first 15 characters are used (16 - NUL terminator)
|
// Only the first 15 characters are used (16 - NUL terminator)
|
||||||
::prctl(PR_SET_NAME, name, 0, 0, 0);
|
::prctl(PR_SET_NAME, name, 0, 0, 0);
|
||||||
#elif 0 && (defined(__FreeBSD__) || defined(__OpenBSD__))
|
#elif 0 && (defined(__FreeBSD__) || defined(__OpenBSD__))
|
||||||
|
|
Loading…
Add table
Reference in a new issue