$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