aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-05-10 09:48:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-05-10 09:48:08 +0200
commitea2b4fb4935627e4dea48f193eeb0019155a3abe (patch)
tree8dd1bbecf9ff634616d7b2717f7b46fcc64fc364 /tests
parent3cb2d76c1e2375ecce69f2c3f462be979295c753 (diff)
Use our own implementation of C++14 threads on MinGWmingw-stdthread
Diffstat (limited to 'tests')
-rw-r--r--tests/fdstream/driver.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/fdstream/driver.cxx b/tests/fdstream/driver.cxx
index 254a03e..0b66574 100644
--- a/tests/fdstream/driver.cxx
+++ b/tests/fdstream/driver.cxx
@@ -12,7 +12,6 @@
#include <ios>
#include <string>
#include <vector>
-#include <thread>
#include <iomanip>
#include <sstream>
#include <fstream>
@@ -20,6 +19,12 @@
#include <iostream>
#include <exception>
+#ifndef LIBBUTL_MINGW_STDTHREAD
+# include <thread>
+#else
+# include <libbutl/mingw-thread.hxx>
+#endif
+
#include <libbutl/path.hxx>
#include <libbutl/process.hxx>
#include <libbutl/fdstream.hxx>
@@ -115,6 +120,12 @@ read_time (const path& p, const T& s, size_t n)
int
main (int argc, const char* argv[])
{
+#ifndef LIBBUTL_MINGW_STDTHREAD
+ using std::thread;
+#else
+ using mingw_stdthread::thread;
+#endif
+
bool v (false);
bool child (false);