diff --git a/recipes-ros/ros-comm/roscpp/0001-make-implicit-cast-explicit.patch b/recipes-ros/ros-comm/roscpp/0001-make-implicit-cast-explicit.patch new file mode 100644 index 0000000..895dee6 --- /dev/null +++ b/recipes-ros/ros-comm/roscpp/0001-make-implicit-cast-explicit.patch @@ -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(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(timeout.toSec() * 1000000.0f))); + } + + if (callbacks_.empty() || !enabled_) diff --git a/recipes-ros/ros-comm/roscpp_1.11.21.bb b/recipes-ros/ros-comm/roscpp_1.11.21.bb index 04e3b61..b878e5a 100644 --- a/recipes-ros/ros-comm/roscpp_1.11.21.bb +++ b/recipes-ros/ros-comm/roscpp_1.11.21.bb @@ -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" diff --git a/recipes-ros/roscpp-core/files/0001-remove-implicit-cast.patch b/recipes-ros/roscpp-core/files/0001-remove-implicit-cast.patch new file mode 100644 index 0000000..f367160 --- /dev/null +++ b/recipes-ros/roscpp-core/files/0001-remove-implicit-cast.patch @@ -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 + } + diff --git a/recipes-ros/roscpp-core/rostime_0.5.8.bb b/recipes-ros/roscpp-core/rostime_0.5.8.bb index 51dd349..40ad83a 100644 --- a/recipes-ros/roscpp-core/rostime_0.5.8.bb +++ b/recipes-ros/roscpp-core/rostime_0.5.8.bb @@ -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"