Source: haskell-clock
Version: 0.4.1.3-2
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
Control: found -1 haskell-clock/0.4.1.3-1
Hi,
haskell-clock does not build on GNU/Hurd [1].
The problem is that code blocks specific for Mac OS X check for the
__MACH__ preprocessor symbol; this is provided on Hurd as well, since
both GNU/Hurd and Mac OS X are based on Mach microkernels.
The easy solution is to change the checks from __MACH__ to
__MACH__ && __APPLE__; patch attached for it.
[1]
https://buildd.debian.org/status/fetch.php?pkg=haskell-clock&arch=hurd-i386&ver=0.4.1.3-2&stamp=1430771611
Thanks,
--
Pino
--- a/csec/clock.c
+++ b/csec/clock.c
@@ -119,7 +119,7 @@ void clock_readres_threadtime(long* t)
// ***********************
#include <time.h>
-#ifdef __MACH__
+#if defined(__MACH__) && defined(__APPLE__)
#include <mach/clock.h>
#include <mach/mach.h>
#define CLOCK_ID_T clock_id_t
@@ -138,7 +138,7 @@ void clock_readres_threadtime(long* t)
void time_(CLOCK_ID_T clock, long* t)
{
- #ifdef __MACH__
+ #if defined(__MACH__) && defined(__APPLE__)
// OS X does not have clock_gettime, use clock_get_time
// see http://stackoverflow.com/questions/11680461/monotonic-clock-on-osx
clock_serv_t cclock;
@@ -188,7 +188,7 @@ void clock_readtime_threadtime(long* t)
void res_(CLOCK_ID_T clock, long* t)
{
- #ifdef __MACH__
+ #if defined(__MACH__) && defined(__APPLE__)
clock_serv_t cclock;
int nsecs;
mach_msg_type_number_t count;