some preliminary fixes to make the SDK feature test work with latest changes to boost

This commit is contained in:
Dominique Hunziker 2018-05-07 22:37:25 +02:00
parent c017174e78
commit 808dcb3a1e
4 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,22 @@
diff --git a/clients/roscpp/src/libros/callback_queue.cpp b/clients/roscpp/src/libros/callback_queue.cpp
index cd2f4f8..fa600d5 100644
--- a/clients/roscpp/src/libros/callback_queue.cpp
+++ b/clients/roscpp/src/libros/callback_queue.cpp
@@ -229,7 +229,7 @@ CallbackQueue::CallOneResult CallbackQueue::callOne(ros::WallDuration timeout)
{
if (!timeout.isZero())
{
- condition_.timed_wait(lock, boost::posix_time::microseconds(timeout.toSec() * 1000000.0f));
+ condition_.timed_wait(lock, boost::posix_time::microseconds(static_cast<int64_t>(timeout.toSec() * 1000000.0f)));
}
if (callbacks_.empty())
@@ -305,7 +305,7 @@ void CallbackQueue::callAvailable(ros::WallDuration timeout)
{
if (!timeout.isZero())
{
- condition_.timed_wait(lock, boost::posix_time::microseconds(timeout.toSec() * 1000000.0f));
+ condition_.timed_wait(lock, boost::posix_time::microseconds(static_cast<int64_t>(timeout.toSec() * 1000000.0f)));
}
if (callbacks_.empty() || !enabled_)

View File

@ -10,7 +10,9 @@ DEPENDS = "cpp-common message-generation rosconsole roscpp-serialization roscpp-
require ros-comm.inc
SRC_URI += "file://0001-roscpp-add-missing-header-for-writev.patch;striplevel=3"
SRC_URI += "\
file://0001-roscpp-add-missing-header-for-writev.patch;striplevel=3\
file://0001-make-implicit-cast-explicit.patch;striplevel=3"
ROS_PKG_SUBDIR = "clients"

View File

@ -0,0 +1,26 @@
diff --git a/rostime/include/ros/impl/duration.h b/rostime/include/ros/impl/duration.h
index 2ca2f5b..7ebd202 100644
--- a/rostime/include/ros/impl/duration.h
+++ b/rostime/include/ros/impl/duration.h
@@ -179,7 +179,7 @@ namespace ros {
#if defined(BOOST_DATE_TIME_HAS_NANOSECONDS)
return bt::seconds(sec) + bt::nanoseconds(nsec);
#else
- return bt::seconds(sec) + bt::microseconds(nsec/1000.0);
+ return bt::seconds(sec) + bt::microseconds(nsec/1000);
#endif
}
}
diff --git a/rostime/include/ros/impl/time.h b/rostime/include/ros/impl/time.h
index ec991e6..61b686c 100644
--- a/rostime/include/ros/impl/time.h
+++ b/rostime/include/ros/impl/time.h
@@ -167,7 +167,7 @@ namespace ros
#if defined(BOOST_DATE_TIME_HAS_NANOSECONDS)
return pt::from_time_t(sec) + pt::nanoseconds(nsec);
#else
- return pt::from_time_t(sec) + pt::microseconds(nsec/1000.0);
+ return pt::from_time_t(sec) + pt::microseconds(nsec/1000);
#endif
}

View File

@ -6,3 +6,5 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=8;endline=8;md5=d566ef916e9dedc
DEPENDS = "boost cpp-common"
require roscpp-core.inc
SRC_URI += "file://0001-remove-implicit-cast.patch;striplevel=2"