sched.h needs to be imported on Darwin/OSX targets.
authorApple SWE <jeremyhu@apple.com>
Wed, 14 Mar 2018 01:29:45 +0000 (18:29 -0700)
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>
Wed, 14 Mar 2018 05:50:56 +0000 (22:50 -0700)
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@apple.com>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
src/gallium/drivers/swr/swr_fence.cpp

index 3005eb9aaadd61dd82b92f2ea182d9cebae9273a..b05ac8cec02fa5a3a8b922b350675c0145fd6c05 100644 (file)
 #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