forked from rpms/glibc
ad85e10075
Upstream commit: commit 6484ae5b8c4d4314f748e4d3c9a9baa5385e57c5 - malloc: Fix -Wuse-after-free warning in tst-mallocalign1 [BZ #26779] - s_sincosf.h: Change pio4 type to float [BZ #28713] - math: Properly cast X_TLOSS to float [BZ #28713] - Regenerate ulps on x86_64 with GCC 12 - Avoid -Wuse-after-free in tests [BZ #26779]. - Fix build of nptl/tst-thread_local1.cc with GCC 12 - Fix stdio-common tests for GCC 12 -Waddress - Fix stdlib/tst-setcontext.c for GCC 12 -Warray-compare - resolv: Avoid GCC 12 false positive warning [BZ #28439]. - intl: Avoid -Wuse-after-free [BZ #26779] - elf: Drop elf/tls-macros.h in favor of __thread and tls_model attributes [BZ #28152] [BZ #28205] - time: Set daylight to 1 for matching DST/offset change (RHBZ#2155352) - elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776) - time: Use 64 bit time on tzfile - nscd: Use 64 bit time_t on libc nscd routines (BZ# 29402) - nis: Build libnsl with 64 bit time_t - Use LFS and 64 bit time for installed programs (BZ #15333) Resolves: #2155352 Related: #2160734
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
commit 803c959745fd7c679e00f9bad58822616f0e51cb
|
|
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 --git a/nptl/tst-thread_local1.cc b/nptl/tst-thread_local1.cc
|
|
index 9608afa4b739e360..338aafea059e10b7 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>
|