diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index eeb51fdb840..7ab4ee12690 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -618,7 +618,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return; } } -#ifdef _GLIBCXX_USE_SCHED_YIELD +#if defined _GLIBCXX_HAS_GTHREADS && defined _GLIBCXX_USE_SCHED_YIELD __gthread_yield(); #endif constexpr auto __n = 1 + sizeof...(_L1);