From ea2b4fb4935627e4dea48f193eeb0019155a3abe Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 10 May 2022 09:48:08 +0200 Subject: Use our own implementation of C++14 threads on MinGW --- libbutl/diagnostics.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libbutl/diagnostics.cxx') diff --git a/libbutl/diagnostics.cxx b/libbutl/diagnostics.cxx index 0826375..f574fd6 100644 --- a/libbutl/diagnostics.cxx +++ b/libbutl/diagnostics.cxx @@ -17,6 +17,12 @@ #include // size_t #include // cerr +#ifndef LIBBUTL_MINGW_STDTHREAD +# include +#else +# include +#endif + #include // thread_local #include @@ -29,7 +35,11 @@ namespace butl { ostream* diag_stream = &cerr; - static mutex diag_mutex; +#ifndef LIBBUTL_MINGW_STDTHREAD + static std::mutex diag_mutex; +#else + static mingw_stdthread::mutex diag_mutex; +#endif string diag_progress; static string diag_progress_blank; // Being printed blanks out the line. -- cgit v1.1