openbsd-ports/net/kismet/patches/patch-panelfront_cc
robert 32b94333d3 SECURITY:
upgrade to version 200508R1;
This fixes several potential security problems, so everyone
should upgrade immidiately.

From Bernd Ahlers <bernd@ba-net.org>, Matthias Kilian <kili@outback.escape.de>
ok pvalchev@
2005-08-16 20:35:58 +00:00

31 lines
882 B
Plaintext

$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;