Explicitly include <sched.h> for sched_yield()

It might be implicitly included by <pthread.h> (and that's why it worked
so far), but it's not guaranteed (for example, this is not the case with
newlib).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@223661 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sergey Dmitrouk 2014-12-08 14:50:21 +00:00
parent 2764d046a1
commit fff544efbd
2 changed files with 2 additions and 0 deletions

View File

@ -178,6 +178,7 @@ template<class Callable, class ...Args>
#ifndef _LIBCPP_HAS_NO_VARIADICS
#include <tuple>
#endif
#include <sched.h>
#include <__undef_min_max>

View File

@ -99,6 +99,7 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <tuple>
#endif
#include <pthread.h>
#include <sched.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header