Fix test failure due to Networking TS headers using mutexes
authorJonathan Wakely <jwakely@redhat.com>
Mon, 20 May 2019 20:21:15 +0000 (21:21 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 20 May 2019 20:21:15 +0000 (21:21 +0100)
Only include the Networking headers for targets with Gthreads, so that
the uses of std::mutex and std::condition_variable don't cause errors.

* testsuite/experimental/names.cc: Only include Networking TS headers
on targets with the necessary Gthreads support.

From-SVN: r271437

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/experimental/names.cc

index 19ba235..cf78ab4 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-20  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/experimental/names.cc: Only include Networking TS headers
+       on targets with the necessary Gthreads support.
+
 2019-05-20  Marek Polacek  <polacek@redhat.com>
 
        CWG 2094 - volatile scalars are trivially copyable.
index 0746ca3..233b348 100644 (file)
 #include <experimental/utility>
 #include <experimental/vector>
 // Networking
-#include <experimental/buffer>
-#include <experimental/internet>
-#include <experimental/io_context>
-#include <experimental/net>
-#include <experimental/netfwd>
-#include <experimental/socket>
-#include <experimental/timer>
-#include <experimental/executor>
+#ifdef _GLIBCXX_HAS_GTHREADS
+# include <experimental/buffer>
+# include <experimental/internet>
+# include <experimental/io_context>
+# include <experimental/net>
+# include <experimental/netfwd>
+# include <experimental/socket>
+# include <experimental/timer>
+# include <experimental/executor>
+#endif