Source: gearmand
Version: 1.0.6-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
Control: forwarded -1 https://bugs.launchpad.net/gearmand/+bug/1198739
Hi,
gearmand 1.0.6 fails to compile on GNU/Hurd [1].
The problem is the misuse of the __MACH__ define for what really is code
specific to Mac OS X (both Hurd and Mac OS X use a (micro)kernel based
on Mach, hence the usage of __MACH__).
I reported upstream [2] a bug about this with a patch for the latest
1.1.8 also fixing a couple of tests; since tests are not executed in
the Debian build, attached there is a reduced version of the patch which
just fixes the build.
[1]
https://buildd.debian.org/status/fetch.php?pkg=gearmand&ver=1.0.6-1&arch=hurd-i386&stamp=1373229741
[2] https://bugs.launchpad.net/gearmand/+bug/1198739
Thanks,
--
Pino
--- a/libtest/timer.cc
+++ b/libtest/timer.cc
@@ -41,7 +41,7 @@
#include <ctime>
#include <iomanip>
-#ifdef __MACH__
+#ifdef __APPLE__
# include <mach/clock.h>
# include <mach/mach.h>
#else
@@ -110,7 +110,7 @@ void Timer::difference(struct timespec&
void Timer::_time(struct timespec& ts)
{
-#ifdef __MACH__ // OSX lacks clock_gettime()
+#ifdef __APPLE__ // OSX lacks clock_gettime()
clock_serv_t _clock_serv;
mach_timespec_t _mach_timespec;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &_clock_serv);