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:
Giel van Schijndel 2012-06-30 20:11:27 +02:00
parent 304ca95508
commit b277b0f100
1 changed files with 1 additions and 1 deletions

View File

@ -1279,7 +1279,7 @@ void runCommand(std::string strCommand)
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)
::prctl(PR_SET_NAME, name, 0, 0, 0);
#elif 0 && (defined(__FreeBSD__) || defined(__OpenBSD__))