public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Fix build of nptl/tst-thread_local1.cc with GCC 12
@ 2021-08-02 16:16 Joseph Myers
  2021-08-02 16:25 ` Florian Weimer
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2021-08-02 16:16 UTC (permalink / raw)
  To: libc-alpha

The test nptl/tst-thread_local1.cc fails to build with GCC mainline
because of changes to what libstdc++ headers implicitly include what
other headers:

tst-thread_local1.cc: In function 'int do_test()':
tst-thread_local1.cc:177:5: error: variable 'std::array<std::pair<const char*, std::function<void(void* (*)(void*))> >, 2> do_thread_X' has initializer but incomplete type
  177 |     do_thread_X
      |     ^~~~~~~~~~~

Fix this by adding an explicit include of <array>.

Tested with build-many-glibcs.py for aarch64-linux-gnu.

diff --git a/nptl/tst-thread_local1.cc b/nptl/tst-thread_local1.cc
index 9608afa..338aafe 100644
--- a/nptl/tst-thread_local1.cc
+++ b/nptl/tst-thread_local1.cc
@@ -21,6 +21,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <array>
 #include <functional>
 #include <string>
 #include <thread>

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-02 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 16:16 Fix build of nptl/tst-thread_local1.cc with GCC 12 Joseph Myers
2021-08-02 16:25 ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).