Browse Source

Avoided using pthread_setname_np on older linux distros.

tags/2021-05-28
jules 12 years ago
parent
commit
7c9cb2971d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_core/native/juce_posix_SharedCode.h

+ 2
- 2
modules/juce_core/native/juce_posix_SharedCode.h View File

@@ -874,7 +874,7 @@ void Thread::setCurrentThreadName (const String& name)
{
[[NSThread currentThread] setName: juceStringToNS (name)];
}
#elif JUCE_LINUX
#elif JUCE_LINUX && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
pthread_setname_np (pthread_self(), name.toRawUTF8());
#endif
}
@@ -885,7 +885,7 @@ bool Thread::setThreadPriority (void* handle, int priority)
int policy;
priority = jlimit (0, 10, priority);
if (handle == 0)
if (handle == nullptr)
handle = (void*) pthread_self();
if (pthread_getschedparam ((pthread_t) handle, &policy, &param) != 0)


Loading…
Cancel
Save