Do not include pthread.h and sched.h when threads are disabled

Patch by Philippe Daouadi!

http://reviews.llvm.org/D9639


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jonathan Roelofs 2015-08-27 17:47:34 +00:00
parent 5ea443059f
commit 044df63102
2 changed files with 4 additions and 0 deletions

View File

@ -14,7 +14,9 @@
#include <__config>
#include <chrono>
#include <system_error>
#ifndef _LIBCPP_HAS_NO_THREADS
#include <pthread.h>
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header

View File

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