bond-core: resolve issue due to update to boost-1.67

This commit is contained in:
Lukas Bulwahn 2018-05-17 05:55:57 +02:00
parent 15db51f087
commit af26ffda05
2 changed files with 52 additions and 0 deletions

View File

@ -7,3 +7,5 @@ S = "${WORKDIR}/${ROS_SP}/${ROS_BPN}"
inherit catkin inherit catkin
ROS_SPN = "bond_core" ROS_SPN = "bond_core"
SRC_URI += "file://0001-Argument-to-Boost-Milliseconds-must-be-integral-in-B.patch;patchdir=.."

View File

@ -0,0 +1,50 @@
From 1240bce50ca1538cdad07dc472d31797257e0851 Mon Sep 17 00:00:00 2001
From: Paul-Edouard Sarlin <Skydes@users.noreply.github.com>
Date: Sun, 29 Apr 2018 22:40:15 +0200
Subject: [PATCH] Argument to Boost Milliseconds must be integral in Boost >=
1.67 (#37)
* Argument to Boost milliseconds must be integral
* Fix style
* More consistent type
Upstream-Status: Accepted [https://github.com/ros/bond_core/commit/1240bce50ca1538cdad07dc472d31797257e0851]
This patch has been generated with:
`git format-patch -1 1240bce50ca1538cdad07dc472d31797257e0851`
in the bond_core repository.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
bondcpp/src/bond.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bondcpp/src/bond.cpp b/bondcpp/src/bond.cpp
index 8872d61..58e7901 100644
--- a/bondcpp/src/bond.cpp
+++ b/bondcpp/src/bond.cpp
@@ -218,7 +218,8 @@ bool Bond::waitUntilFormed(ros::WallDuration timeout)
break; // The deadline has expired
}
- condition_.timed_wait(mutex_, boost::posix_time::milliseconds(wait_time.toSec() * 1000.0f));
+ condition_.timed_wait(mutex_, boost::posix_time::milliseconds(
+ static_cast<int64_t>(wait_time.toSec() * 1000.0f)));
}
return sm_.getState().getId() != SM::WaitingForSister.getId();
}
@@ -246,7 +247,8 @@ bool Bond::waitUntilBroken(ros::WallDuration timeout)
break; // The deadline has expired
}
- condition_.timed_wait(mutex_, boost::posix_time::milliseconds(wait_time.toSec() * 1000.0f));
+ condition_.timed_wait(mutex_, boost::posix_time::milliseconds(
+ static_cast<int64_t>(wait_time.toSec() * 1000.0f)));
}
return sm_.getState().getId() == SM::Dead.getId();
}
--
2.7.4