https://gitlab.kitware.com/diatomic/diy/-/merge_requests/59
From
bb0d55c8ae34a43354b1002262dad722c410d8cb Mon Sep 17 00:00:00 2001
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sat, 13 Jun 2020 13:59:31 +0200
Subject: [PATCH] Fix build on mach-based OS which are not OS X
Gbp-Pq: Name 95_java_mach-arch_fix.patch
#ifndef _WIN32
#include <sys/time.h>
-#ifdef __MACH__
+#if defined(__MACH__) && defined(__APPLE__)
#include <mach/clock.h>
#include <mach/mach.h>
-#endif // __MACH__
+#endif // __MACH__ && __APPLE__
#endif // ifndef _WIN32
namespace diy
inline time_type get_time()
{
-#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
+#if defined(__MACH__) && defined(__APPLE__) // OS X does not have clock_gettime, use clock_get_time
clock_serv_t cclock;
mach_timespec_t ts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);