$NetBSD: patch-aa,v 1.2 2002/10/24 19:04:23 hubertf Exp $

--- hot-babe.c.orig	Sat Sep 21 16:53:24 2002
+++ hot-babe.c
@@ -74,6 +74,12 @@
 /* returns current CPU load in percent, 0 to 256 */
 static int system_cpu(void)
 {
+#ifdef __NetBSD__
+	double l;
+	if (getloadavg(&l, 1) < 0)
+		return 256;
+	return (int)(256 * (l>2.0? 2.0 : l) / 2.0);
+#else
   unsigned int  cpuload;
   u_int64_t     load, total, oload, ototal;
   u_int64_t     ab, ac, ad, ae;
@@ -111,6 +117,7 @@
     cpuload = (256 * (load - oload)) / (total - ototal);
 
   return cpuload;
+#endif 
 }
 
 
