From 4c7399e992337bdafe37b665ab3e92a97b5dc051 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 20 May 2019 21:21:15 +0100 Subject: [PATCH] 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 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/testsuite/experimental/names.cc | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 19ba2355c43..cf78ab458d3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2019-05-20 Jonathan Wakely + + * testsuite/experimental/names.cc: Only include Networking TS headers + on targets with the necessary Gthreads support. + 2019-05-20 Marek Polacek CWG 2094 - volatile scalars are trivially copyable. diff --git a/libstdc++-v3/testsuite/experimental/names.cc b/libstdc++-v3/testsuite/experimental/names.cc index 0746ca34e06..233b3487981 100644 --- a/libstdc++-v3/testsuite/experimental/names.cc +++ b/libstdc++-v3/testsuite/experimental/names.cc @@ -56,11 +56,13 @@ #include #include // Networking -#include -#include -#include -#include -#include -#include -#include -#include +#ifdef _GLIBCXX_HAS_GTHREADS +# include +# include +# include +# include +# include +# include +# include +# include +#endif