public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] Fix build of nptl/tst-thread_local1.cc with GCC 12
@ 2022-10-27 20:50 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2022-10-27 20:50 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7255e947f2ee7700d0a2f4115f9598e2dd8f3c2c

commit 7255e947f2ee7700d0a2f4115f9598e2dd8f3c2c
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Aug 2 16:33:44 2021 +0000

    Fix build of nptl/tst-thread_local1.cc with GCC 12
    
    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.
    
    (cherry picked from commit 2ee9b24f47db8d0a8d0ccadb999335a1d4cfc364)

Diff:
---
 nptl/tst-thread_local1.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nptl/tst-thread_local1.cc b/nptl/tst-thread_local1.cc
index 0cfdcd6d19..5f4cf5cc3b 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>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-27 20:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 20:50 [glibc/google/grte/v5-2.27/master] Fix build of nptl/tst-thread_local1.cc with GCC 12 Fangrui Song

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