summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_fence.cpp
diff options
context:
space:
mode:
authorApple SWE <[email protected]>2018-03-13 18:29:45 -0700
committerJeremy Huddleston Sequoia <[email protected]>2018-03-13 22:50:56 -0700
commit9dc5063262d0a5130cf0723a33079f3fd17560c3 (patch)
treed4167b7a915315687e75cc379118539e0d53e4da /src/gallium/drivers/swr/swr_fence.cpp
parentde0d10db93d85de79c7b4451c4851ace2976f8f4 (diff)
sched.h needs to be imported on Darwin/OSX targets.
sched_yield is used but the include reference on Darwin is missing. This patch conditionally guards on Darwin/OSX to import sched.h first. Reviewed-by: Jeremy Huddleston Sequoia <[email protected]> Signed-off-by: Jeremy Huddleston Sequoia <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_fence.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_fence.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_fence.cpp b/src/gallium/drivers/swr/swr_fence.cpp
index 3005eb9aaad..b05ac8cec02 100644
--- a/src/gallium/drivers/swr/swr_fence.cpp
+++ b/src/gallium/drivers/swr/swr_fence.cpp
@@ -29,6 +29,10 @@
#include "swr_screen.h"
#include "swr_fence.h"
+#ifdef __APPLE__
+#include <sched.h>
+#endif
+
#if defined(PIPE_CC_MSVC) // portable thread yield
#define sched_yield SwitchToThread
#endif