Mesa (master): sched.h needs to be imported on Darwin/OSX targets.

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Wed Mar 14 05:51:30 UTC 2018


Module: Mesa
Branch: master
Commit: 9dc5063262d0a5130cf0723a33079f3fd17560c3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9dc5063262d0a5130cf0723a33079f3fd17560c3

Author: Apple SWE <jeremyhu at apple.com>
Date:   Tue Mar 13 18:29:45 2018 -0700

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 <jeremyhu at apple.com>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>

---

 src/gallium/drivers/swr/swr_fence.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/swr/swr_fence.cpp b/src/gallium/drivers/swr/swr_fence.cpp
index 3005eb9aaa..b05ac8cec0 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




More information about the mesa-commit mailing list