aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/src/c++11/compatibility-chrono.cc5
2 files changed, 10 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 7b351a9..85e96a3 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-28 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * src/c++11/compatibility-chrono.cc (steady_clock::now()): If
+ !_GLIBCXX_USE_GETTIMEOFDAY perform conversion inline instead of
+ calling non-existent from_time_t.
+
2013-05-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt:
diff --git a/libstdc++-v3/src/c++11/compatibility-chrono.cc b/libstdc++-v3/src/c++11/compatibility-chrono.cc
index fd67dae..efc32f5 100644
--- a/libstdc++-v3/src/c++11/compatibility-chrono.cc
+++ b/libstdc++-v3/src/c++11/compatibility-chrono.cc
@@ -78,7 +78,10 @@ namespace std _GLIBCXX_VISIBILITY(default)
+ chrono::microseconds(tv.tv_usec)));
#else
std::time_t __sec = std::time(0);
- return system_clock::from_time_t(__sec);
+ // This is the conversion done by system_clock::from_time_t(__sec)
+ typedef chrono::time_point<system_clock, seconds> __from;
+ return time_point_cast<system_clock::duration>
+ (__from(chrono::seconds(__sec)));
#endif
}