_java_mach-arch_fix
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Thu, 23 Jan 2025 07:49:29 +0000 (08:49 +0100)
committerBastian Germann <bage@debian.org>
Thu, 23 Jan 2025 07:49:29 +0000 (08:49 +0100)
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

ThirdParty/diy2/vtkdiy2/include/vtkdiy2/time.hpp

index 692cf3673103af5e641aaeb7ca9f210516fc258e..671e69ddf390565a462727571fb729910c5b0ad2 100644 (file)
@@ -3,10 +3,10 @@
 
 #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
@@ -16,7 +16,7 @@ typedef     unsigned long       time_type;
 
 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);