wt: fix build against boost 1.50+

Signed-off-by: Florian Fainelli <florian@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@34636 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2012-12-11 17:22:31 +00:00
parent 40f5fdd136
commit 4f9707c748

View File

@ -0,0 +1,27 @@
--- a/src/threadpool/threadpool/task_adaptors.hpp
+++ b/src/threadpool/threadpool/task_adaptors.hpp
@@ -135,7 +135,11 @@
if(m_break_s > 0 || m_break_ns > 0)
{ // Sleep some time before first execution
xtime xt;
+#if BOOST_VERSION >= 105000
+ xtime_get(&xt, TIME_UTC_);
+#else
xtime_get(&xt, TIME_UTC);
+#endif
xt.nsec += m_break_ns;
xt.sec += m_break_s;
thread::sleep(xt);
@@ -146,7 +150,11 @@
if(m_break_s > 0 || m_break_ns > 0)
{
xtime xt;
+#if BOOST_VERSION >= 105000
+ xtime_get(&xt, TIME_UTC_);
+#else
xtime_get(&xt, TIME_UTC);
+#endif
xt.nsec += m_break_ns;
xt.sec += m_break_s;
thread::sleep(xt);