From a77967e715ba05ad0b295efeb4b81554a4f978e7 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 17 Jan 2015 19:08:57 -0800
Subject: [PATCH 1009/1012] Only call setpriority(PRIO_DARWIN_THREAD, 0,
 PRIO_DARWIN_BG) if it is available

Tiger and earlier versions of darwin do not support this.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 92a47c4641be0c3fbc0e660f5680b3d4d524887f)

Conflicts:
	tools/libclang/CIndex.cpp
---
 tools/libclang/CIndex.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git llvm_release_34/tools/clang/tools/libclang/CIndex.cpp macports_release_34/tools/clang/tools/libclang/CIndex.cpp
index f53e5c1..2189f09 100644
--- llvm_release_34/tools/clang/tools/libclang/CIndex.cpp
+++ macports_release_34/tools/clang/tools/libclang/CIndex.cpp
@@ -6518,7 +6518,7 @@ void clang::setThreadBackgroundPriority() {
     return;
 
   // FIXME: Move to llvm/Support and make it cross-platform.
-#ifdef __APPLE__
+#if defined(__APPLE__) && defined(PRIO_DARWIN_THREAD) && defined(PRIO_DARWIN_BG)
   setpriority(PRIO_DARWIN_THREAD, 0, PRIO_DARWIN_BG);
 #endif
 }
-- 
2.10.1

