pkgsrc/parallel/ganglia-monitor-core/patches/patch-ac
brook 9ed8e79a26 Update to v3.1.2. The number of changes over the intervening years is
too large to list here.  See the ChangeLog file or the home page for
details.
2009-11-10 14:55:17 +00:00

16 lines
562 B
Text

$NetBSD: patch-ac,v 1.3 2009/11/10 14:55:18 brook Exp $
--- libmetrics/netbsd/metrics.c.orig 2009-01-28 16:23:20.000000000 -0700
+++ libmetrics/netbsd/metrics.c
@@ -134,7 +134,10 @@ cpu_speed_func ( void )
cpu_speed = 0;
-#if (__NetBSD_Version__ > 299000000)
+#if (__NetBSD_Version__ > 500000000)
+ if (sysctlbyname("machdep.tsc_freq", &cpu_speed, &len, NULL, 0) == -1)
+ val.uint32 = 0;
+#elif (__NetBSD_Version__ > 299000000)
if (sysctlbyname("machdep.est.frequency.target", &cpu_speed, &len, NULL, 0) == -1)
val.uint32 = 0;
#endif