PR libstdc++/59680 * src/c++11/thread.cc (__sleep_for): Fix call to ::sleep.
Tested x86_64-linux, and tested again with a hacked c++config.h to use ::sleep(), committed to trunk.
commit 3de5274663e0214b8c5335e99ef85f325f709840 Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Jan 9 14:33:20 2014 +0000 PR libstdc++/59680 * src/c++11/thread.cc (__sleep_for): Fix call to ::sleep. 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;