From 4bc0ec326170cb9307c3fe226627e5b381078266 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 9 Jan 2014 23:39:31 +0000 Subject: [PATCH] re PR libstdc++/59680 (Compile error in thread.cc) PR libstdc++/59680 * src/c++11/thread.cc (__sleep_for): Fix call to ::sleep. From-SVN: r206504 --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/src/c++11/thread.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d73a0b3..19269f5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -4,6 +4,9 @@ * include/bits/stl_vector.h (vector<>::_M_move_assign): Restore support for non-Movable types. + PR libstdc++/59680 + * src/c++11/thread.cc (__sleep_for): Fix call to ::sleep. + 2014-01-08 François Dumont * include/bits/stl_vector.h (std::vector<>::_M_move_assign): Pass diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc index d7c3fb1..49aacb5 100644 --- a/libstdc++-v3/src/c++11/thread.cc +++ b/libstdc++-v3/src/c++11/thread.cc @@ -183,7 +183,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ::usleep(__us); } # else - ::sleep(__s.count() + (__ns >= 1000000)); + ::sleep(__s.count() + (__ns.count() >= 1000000)); # endif #elif defined(_GLIBCXX_HAVE_WIN32_SLEEP) unsigned long ms = __ns.count() / 1000000; -- 2.7.4