36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From 6a57ff6feaa2900c8a65d0563925171198f5ce64 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Kolesa <daniel@octaforge.org>
|
|
Date: Tue, 18 Aug 2020 19:52:01 +0200
|
|
Subject: [PATCH] fix highwayhash on ppc/musl
|
|
|
|
---
|
|
auxil/highwayhash/highwayhash/arch_specific.cc | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git auxil/highwayhash/highwayhash/arch_specific.cc auxil/highwayhash/highwayhash/arch_specific.cc
|
|
index 82d1574..198a82f 100644
|
|
--- auxil/highwayhash/highwayhash/arch_specific.cc
|
|
+++ auxil/highwayhash/highwayhash/arch_specific.cc
|
|
@@ -171,15 +171,18 @@ double InvariantTicksPerSecond() {
|
|
#if HH_ARCH_PPC
|
|
#if __GLIBC__
|
|
static const double cycles_per_second = __ppc_get_timebase_freq();
|
|
+ return cycles_per_second;
|
|
#elif __FreeBSD__
|
|
static double cycles_per_second = 0;
|
|
size_t length = sizeof(cycles_per_second);
|
|
sysctlbyname("kern.timecounter.tc.timebase.frequency", &cycles_per_second, &length, NULL, 0);
|
|
-#endif
|
|
return cycles_per_second;
|
|
#else
|
|
return NominalClockRate();
|
|
#endif
|
|
+#else
|
|
+ return NominalClockRate();
|
|
+#endif
|
|
}
|
|
|
|
} // namespace highwayhash
|
|
--
|
|
2.28.0
|
|
|