summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-11-04 19:03:35 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-11-05 10:32:45 +0100
commit24285926c21fd1ea36157895de2d55e489b63f9f (patch)
tree6e8ec424601abd5b0c28ce4aac33c0debac97cb0 /platform/default
parented1a7616325ea5304093b796879ab9ae56a744c2 (diff)
downloadqtlocation-mapboxgl-24285926c21fd1ea36157895de2d55e489b63f9f.tar.gz
[core] Include Linux-specific scheduling header
before, builds for Linux didn't include thread priority control
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/thread.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/default/thread.cpp b/platform/default/thread.cpp
index 12d1802c2f..3ef3257923 100644
--- a/platform/default/thread.cpp
+++ b/platform/default/thread.cpp
@@ -3,6 +3,9 @@
#include <mbgl/platform/log.hpp>
#include <pthread.h>
+#ifdef __linux__
+#include <linux/sched.h>
+#endif
#include <sched.h>
namespace mbgl {
@@ -16,6 +19,8 @@ void makeThreadLowPriority() {
if (status != 0) {
Log::Warning(Event::General, "Couldn't set thread scheduling policy");
}
+#else
+#pragma message("Building without thread priority control")
#endif
}