From: Jonathan Wakely Date: Mon, 20 May 2019 20:21:15 +0000 (+0100) Subject: Fix test failure due to Networking TS headers using mutexes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c7399e992337bdafe37b665ab3e92a97b5dc051;p=gcc.git 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 --- 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