Source: gretl
Version: 2016b-3
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

gretl fails to build on GNU/Hurd due to a name clash with OSX/Apple, both
defining the __MACH__ keyword. The intended usage is for OSX-based systems,
including <mach/mach_time.h>, which does not exist on GNU/Hurd. This package
has built before, latest successful build was 2016a-1. The attached patch fixes
the build problems for version 2016b-3.

Thanks!
Index: gretl-2016b/lib/src/gretl_utils.c
===================================================================
--- gretl-2016b.orig/lib/src/gretl_utils.c
+++ gretl-2016b/lib/src/gretl_utils.c
@@ -2877,7 +2877,7 @@ const char *blas_variant_string (void)
     }
 }
 
-#ifdef __MACH__
+#if defined(__MACH__) && defined(__APPLE__)
 # include <mach/mach_time.h>
 #elif GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 28
 
@@ -2909,7 +2909,7 @@ static gint64 posix_monotonic_time (void
 
 gint64 gretl_monotonic_time (void)
 {
-#ifdef __MACH__
+#if defined(__MACH__) && defined(__APPLE__)
     return (gint64) mach_absolute_time();
 #elif GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 28
     return posix_monotonic_time();

Reply via email to