diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-01-03 17:42:36 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-01-03 17:46:05 +0000 |
commit | 3729900bf2f7a644fea876448a1cc1e25314b609 (patch) | |
tree | ad52e447ade7bb6642564a432b0999515ba3fe62 | |
parent | ec6fc486ac49dc23f447cb5c0aba466f44a8d86c (diff) | |
download | ports-3729900bf2f7a644fea876448a1cc1e25314b609.tar.gz ports-3729900bf2f7a644fea876448a1cc1e25314b609.zip |
audio/ardour: fix build on powerpc64*
In file included from ../libs/ardour/ardour/plugin.h:37:
../libs/ardour/ardour/cycles.h:75:10: fatal error: 'sys/platform/ppc.h' file not found
-rw-r--r-- | audio/ardour/files/patch-libs_ardour_ardour_cycles.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/audio/ardour/files/patch-libs_ardour_ardour_cycles.h b/audio/ardour/files/patch-libs_ardour_ardour_cycles.h new file mode 100644 index 000000000000..666c0bfde27c --- /dev/null +++ b/audio/ardour/files/patch-libs_ardour_ardour_cycles.h @@ -0,0 +1,25 @@ +--- libs/ardour/ardour/cycles.h.orig 2023-01-03 16:39:59 UTC ++++ libs/ardour/ardour/cycles.h +@@ -72,12 +72,22 @@ static inline cycles_t get_cycles (void) + + #elif defined(__powerpc64__) + ++#ifdef __linux__ + #include <sys/platform/ppc.h> + typedef uint64_t cycles_t; + static inline cycles_t get_cycles(void) + { + return __ppc_get_timebase(); + } ++#elif defined(__FreeBSD__) ++typedef uint64_t cycles_t; ++static inline cycles_t get_cycles(void) ++{ ++ cycles_t tbr; ++ asm volatile("mfspr %0, 268" : "=r"(tbr)); ++ return tbr; ++} ++#endif + + #elif defined(__powerpc__) + |