[clang-tools-extra] r346638 - [clangd] Fix compile on very old glibc
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 12 00:17:49 PST 2018
Author: sammccall
Date: Mon Nov 12 00:17:49 2018
New Revision: 346638
URL: http://llvm.org/viewvc/llvm-project?rev=346638&view=rev
Log:
[clangd] Fix compile on very old glibc
Modified:
clang-tools-extra/trunk/clangd/Threading.cpp
Modified: clang-tools-extra/trunk/clangd/Threading.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Threading.cpp?rev=346638&r1=346637&r2=346638&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Threading.cpp (original)
+++ clang-tools-extra/trunk/clangd/Threading.cpp Mon Nov 12 00:17:49 2018
@@ -101,7 +101,8 @@ void wait(std::unique_lock<std::mutex> &
}
void setThreadPriority(std::thread &T, ThreadPriority Priority) {
-#ifdef __linux__
+ // Some *really* old glibcs are missing SCHED_IDLE.
+#if defined(__linux__) && defined(SCHED_IDLE)
sched_param priority;
priority.sched_priority = 0;
pthread_setschedparam(
More information about the cfe-commits
mailing list