6ca6e8
commit 803c959745fd7c679e00f9bad58822616f0e51cb
6ca6e8
Author: Joseph Myers <joseph@codesourcery.com>
6ca6e8
Date:   Mon Aug 2 16:33:44 2021 +0000
6ca6e8
6ca6e8
    Fix build of nptl/tst-thread_local1.cc with GCC 12
6ca6e8
    
6ca6e8
    The test nptl/tst-thread_local1.cc fails to build with GCC mainline
6ca6e8
    because of changes to what libstdc++ headers implicitly include what
6ca6e8
    other headers:
6ca6e8
    
6ca6e8
    tst-thread_local1.cc: In function 'int do_test()':
6ca6e8
    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
6ca6e8
      177 |     do_thread_X
6ca6e8
          |     ^~~~~~~~~~~
6ca6e8
    
6ca6e8
    Fix this by adding an explicit include of <array>.
6ca6e8
    
6ca6e8
    Tested with build-many-glibcs.py for aarch64-linux-gnu.
6ca6e8
    
6ca6e8
    (cherry picked from commit 2ee9b24f47db8d0a8d0ccadb999335a1d4cfc364)
6ca6e8
6ca6e8
diff --git a/nptl/tst-thread_local1.cc b/nptl/tst-thread_local1.cc
6ca6e8
index 9608afa4b739e360..338aafea059e10b7 100644
6ca6e8
--- a/nptl/tst-thread_local1.cc
6ca6e8
+++ b/nptl/tst-thread_local1.cc
6ca6e8
@@ -21,6 +21,7 @@
6ca6e8
 #include <stdio.h>
6ca6e8
 #include <string.h>
6ca6e8
 
6ca6e8
+#include <array>
6ca6e8
 #include <functional>
6ca6e8
 #include <string>
6ca6e8
 #include <thread>