$OpenBSD: patch-panelfront_cc,v 1.3 2005/08/16 20:35:59 robert Exp $
--- panelfront.cc.orig	Tue Aug 16 03:22:51 2005
+++ panelfront.cc	Tue Aug 16 10:35:14 2005
@@ -22,7 +22,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 
-#ifdef SYS_OPENBSD
+#if defined(SYS_OPENBSD) && defined(HAVE_MACHINE_APMVAR_H)
 #include <machine/apmvar.h>
 #endif
 
@@ -1535,7 +1535,7 @@ int PanelFront::Tick() {
                 closedir(batteries);
         }
 
-#elif defined(SYS_OPENBSD)
+#elif defined(SYS_OPENBSD) && defined(HAVE_MACHINE_APMVAR_H)
 
 		struct apm_power_info api;
 		int apmfd;
@@ -1561,7 +1561,7 @@ int PanelFront::Tick() {
 			}
 			if (bat_available == 1) {
 				bat_percentage = (int)api.battery_life;
-				bat_time = (int)api.minutes_left;
+				bat_time = (int)api.minutes_left * 60;
 				if (api.battery_state == APM_BATT_CHARGING) {
 					bat_ac = 1;
 					bat_charging = 1;
