From 044df63102fc3b504002587fbeee5ff8c074d67b Mon Sep 17 00:00:00 2001 From: Jonathan Roelofs Date: Thu, 27 Aug 2015 17:47:34 +0000 Subject: [PATCH] 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 --- include/__mutex_base | 2 ++ include/mutex | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/__mutex_base b/include/__mutex_base index d5ece7c14..c78be2472 100644 --- a/include/__mutex_base +++ b/include/__mutex_base @@ -14,7 +14,9 @@ #include <__config> #include #include +#ifndef _LIBCPP_HAS_NO_THREADS #include +#endif #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/include/mutex b/include/mutex index 373d75b09..a0875a568 100644 --- a/include/mutex +++ b/include/mutex @@ -179,7 +179,9 @@ template #ifndef _LIBCPP_HAS_NO_VARIADICS #include #endif +#ifndef _LIBCPP_HAS_NO_THREADS #include +#endif #include <__undef_min_max>