Skip to content

Commit 101cfe1

Browse files
glandiummplatings
authored andcommitted
[libcxx] Fix build bustage with threads disabled
Building with -DLIBCXX_ENABLE_THREADS=OFF -DLIBCXXABI_ENABLE_THREADS=OFF (like e.g. for wasm) fails after D146228 because of a misplaced std namespace begin/end. Reviewed By: philnik, #libc Differential Revision: https://reviews.llvm.org/D146682
1 parent 40aaa27 commit 101cfe1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libcxx/include/__condition_variable/condition_variable.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
_LIBCPP_PUSH_MACROS
3030
#include <__undef_macros>
3131

32-
#ifndef _LIBCPP_HAS_NO_THREADS
33-
3432
_LIBCPP_BEGIN_NAMESPACE_STD
3533

34+
#ifndef _LIBCPP_HAS_NO_THREADS
35+
3636
// enum class cv_status
3737
_LIBCPP_DECLARE_STRONG_ENUM(cv_status){no_timeout, timeout};
3838
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
@@ -234,10 +234,10 @@ inline void condition_variable::__do_timed_wait(unique_lock<mutex>& __lk,
234234
wait_for(__lk, __tp - _Clock::now());
235235
}
236236

237-
_LIBCPP_END_NAMESPACE_STD
238-
239237
#endif // _LIBCPP_HAS_NO_THREADS
240238

239+
_LIBCPP_END_NAMESPACE_STD
240+
241241
_LIBCPP_POP_MACROS
242242

243243
#endif // _LIBCPP___CONDITION_VARIABLE_CONDITION_VARIABLE_H

0 commit comments

Comments
 (0)