summarylogtreecommitdiffstats
path: root/boost_time_type.patch
diff options
context:
space:
mode:
Diffstat (limited to 'boost_time_type.patch')
-rw-r--r--boost_time_type.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/boost_time_type.patch b/boost_time_type.patch
new file mode 100644
index 000000000000..eb8303931a1b
--- /dev/null
+++ b/boost_time_type.patch
@@ -0,0 +1,26 @@
+diff --git a/include/ros/impl/duration.h b/include/ros/impl/duration.h
+index 371064f..cd55034 100644
+--- a/include/ros/impl/duration.h
++++ b/include/ros/impl/duration.h
+@@ -173,7 +173,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 / (int32_t) 1000);
+ #endif
+ }
+ }
+diff --git a/include/ros/impl/time.h b/include/ros/impl/time.h
+index d07737d..95814d7 100644
+--- a/include/ros/impl/time.h
++++ b/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 / (int32_t) 1000);
+ #endif
+ }
+