From: yxj-github-437 <2457369732@qq.com> Date: Thu, 16 Jan 2025 16:01:01 +0000 (+0800) Subject: libstdc++: fix possible undefined std::timespec in module std X-Git-Tag: basepoints/gcc-16~1710 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a08a5bc4b3998bd4f8d0cca491b8ab6c93769e07;p=thirdparty%2Fgcc.git 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 --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 }