summaryrefslogtreecommitdiff
path: root/battstat/power-management.c
diff options
context:
space:
mode:
authorOBATA Akio <[email protected]>2015-03-22 18:37:23 +0900
committerOBATA Akio <[email protected]>2015-03-22 18:37:23 +0900
commit9a90ce6f1506375aedf077780d858b513f1b3ac3 (patch)
treee2497be4ca878b6ecb426d91e212aacf06822368 /battstat/power-management.c
parentdccdd8a292968073eae062a7b602a13e212a8dad (diff)
downloadmate-applets-9a90ce6f1506375aedf077780d858b513f1b3ac3.tar.bz2
mate-applets-9a90ce6f1506375aedf077780d858b513f1b3ac3.tar.xz
battstat applet: fix NetBSD APM support
Diffstat (limited to 'battstat/power-management.c')
-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__)