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 19ba2355c432971925cd88ced5182f87964df775..cf78ab458d3203f37e762e5551dfdd3d9692c462 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 0746ca34e06ff47683e8f4d4989be2b971a3169c..233b3487981db95489baab121208b27734d49cbc 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