[ros-roscpp-core] 01/03: Add patch for Hurd
Jochen Sprickerhof
jspricke at moszumanska.debian.org
Tue Sep 26 08:47:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
jspricke pushed a commit to branch master
in repository ros-roscpp-core.
commit 9e5d3526b58d0e7e51b253d3ca59b9a8daeb1786
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date: Tue Sep 26 10:42:57 2017 +0200
Add patch for Hurd
---
.../0003-Only-use-Apple-features-on-Apple.patch | 48 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 49 insertions(+)
diff --git a/debian/patches/0003-Only-use-Apple-features-on-Apple.patch b/debian/patches/0003-Only-use-Apple-features-on-Apple.patch
new file mode 100644
index 0000000..ff0b02e
--- /dev/null
+++ b/debian/patches/0003-Only-use-Apple-features-on-Apple.patch
@@ -0,0 +1,48 @@
+From: Jochen Sprickerhof <git at jochen.sprickerhof.de>
+Date: Tue, 26 Sep 2017 10:14:10 +0200
+Subject: Only use Apple features on Apple
+
+GNU Mach set's __MACH__ a well, but doesn't provide the interface.
+---
+ rostime/src/time.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/rostime/src/time.cpp b/rostime/src/time.cpp
+index d08c92c..5b85071 100644
+--- a/rostime/src/time.cpp
++++ b/rostime/src/time.cpp
+@@ -46,10 +46,10 @@
+ #include <limits>
+
+ // time related includes for macOS
+-#if defined(__MACH__)
++#if defined(__APPLE__)
+ #include <mach/clock.h>
+ #include <mach/mach.h>
+-#endif // defined(__MACH__)
++#endif // defined(__APPLE__)
+
+ #include <boost/thread/mutex.hpp>
+ #include <boost/io/ios_state.hpp>
+@@ -188,7 +188,7 @@ namespace ros
+ {
+ #ifndef WIN32
+ timespec start;
+-#if defined(__MACH__)
++#if defined(__APPLE__)
+ // On macOS use clock_get_time.
+ clock_serv_t cclock;
+ mach_timespec_t mts;
+@@ -197,10 +197,10 @@ namespace ros
+ mach_port_deallocate(mach_task_self(), cclock);
+ start.tv_sec = mts.tv_sec;
+ start.tv_nsec = mts.tv_nsec;
+-#else // defined(__MACH__)
++#else // defined(__APPLE__)
+ // Otherwise use clock_gettime.
+ clock_gettime(CLOCK_MONOTONIC, &start);
+-#endif // defined(__MACH__)
++#endif // defined(__APPLE__)
+ sec = start.tv_sec;
+ nsec = start.tv_nsec;
+ #else
diff --git a/debian/patches/series b/debian/patches/series
index c4a5f1f..7221243 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-Add-CMakeLists.txt.patch
0002-Add-Debian-specific-SONAMEs.patch
+0003-Only-use-Apple-features-on-Apple.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/ros-roscpp-core.git
More information about the debian-science-commits
mailing list