https://gcc.gnu.org/g:a08a5bc4b3998bd4f8d0cca491b8ab6c93769e07
commit r15-7843-ga08a5bc4b3998bd4f8d0cca491b8ab6c93769e07 Author: yxj-github-437 <2457369...@qq.com> Date: Fri Jan 17 00:01:01 2025 +0800 libstdc++: fix possible undefined std::timespec in module std I notice std::timespec and std::timespec_get are used in preprocessor condition _GLIBCXX_HAVE_TIMESPEC_GET. So in module std, it should be the same. libstdc++-v3: * src/c++23/std-clib.cc.in (timespec): Move within preprocessor group guarded by _GLIBCXX_HAVE_TIMESPEC_GET. Diff: --- libstdc++-v3/src/c++23/std-clib.cc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/src/c++23/std-clib.cc.in b/libstdc++-v3/src/c++23/std-clib.cc.in index 6809ad229d7c..10fc03e7ce0b 100644 --- a/libstdc++-v3/src/c++23/std-clib.cc.in +++ b/libstdc++-v3/src/c++23/std-clib.cc.in @@ -585,9 +585,9 @@ export C_LIB_NAMESPACE using std::strftime; using std::time; using std::time_t; - using std::timespec; using std::tm; #ifdef _GLIBCXX_HAVE_TIMESPEC_GET + using std::timespec; using std::timespec_get; #endif }