summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--battstat/power-management.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/battstat/power-management.c b/battstat/power-management.c
index 3dd2c8ec..8c2eb7b2 100644
--- a/battstat/power-management.c
+++ b/battstat/power-management.c
@@ -239,7 +239,11 @@ apm_readinfo (BatteryStatus *status)
#elif defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/param.h>
+#if defined(__NetBSD__)
+#include <dev/apm/apmio.h>
+#else /* __OpenBSD__ */
#include <machine/apmvar.h>
+#endif
#define APMDEVICE "/dev/apm"
@@ -249,7 +253,11 @@ apm_readinfo (BatteryStatus *status)
/* Code for OpenBSD by Joe Ammond <[email protected]>. Using the same
procedure as for FreeBSD.
*/
+#if defined(__NetBSD__)
+ struct apm_power_info apminfo;
+#else /* __OpenBSD__ */
struct apm_info apminfo;
+#endif
int fd;
#if defined(__NetBSD__)