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:
parent
2764d046a1
commit
fff544efbd
@ -178,6 +178,7 @@ template<class Callable, class ...Args>
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
#include <tuple>
|
||||
#endif
|
||||
#include <sched.h>
|
||||
|
||||
#include <__undef_min_max>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user