aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-05-20 21:21:15 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-05-20 21:21:15 +0100
commit4c7399e992337bdafe37b665ab3e92a97b5dc051 (patch)
treeb3cdf6bf0443ccbb7b31ef183f5df39458d87c36
parentbe9e458d8bed984fe13bd7a6daf76bb34ef3ed7f (diff)
downloadgcc-4c7399e992337bdafe37b665ab3e92a97b5dc051.zip
gcc-4c7399e992337bdafe37b665ab3e92a97b5dc051.tar.gz
gcc-4c7399e992337bdafe37b665ab3e92a97b5dc051.tar.bz2
Fix test failure due to Networking TS headers using mutexes
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
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/testsuite/experimental/names.cc18
2 files changed, 15 insertions, 8 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 19ba235..cf78ab4 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/testsuite/experimental/names.cc b/libstdc++-v3/testsuite/experimental/names.cc
index 0746ca3..233b348 100644
--- a/libstdc++-v3/testsuite/experimental/names.cc
+++ b/libstdc++-v3/testsuite/experimental/names.cc
@@ -56,11 +56,13 @@
#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