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
This commit is contained in:
Jonathan Wakely 2019-05-20 21:21:15 +01:00 committed by Jonathan Wakely
parent be9e458d8b
commit 4c7399e992
2 changed files with 15 additions and 8 deletions

View 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.

View File

@ -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