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>