diff options
author | monsta <[email protected]> | 2015-05-25 11:06:01 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2015-05-25 11:06:01 +0300 |
commit | ff502d24176620db57bd6a3e4998377aec305906 (patch) | |
tree | 789d0d88e3d7f37eadede817bd403dc8bdf45db4 /battstat | |
parent | dab2d10edfb4a594f1b539a648825d06b0883364 (diff) | |
parent | 9a90ce6f1506375aedf077780d858b513f1b3ac3 (diff) | |
download | mate-applets-ff502d24176620db57bd6a3e4998377aec305906.tar.bz2 mate-applets-ff502d24176620db57bd6a3e4998377aec305906.tar.xz |
Merge pull request #130 from obache/netbsd-apm-fix
battstat applet: fix NetBSD APM support
Diffstat (limited to 'battstat')
-rw-r--r-- | battstat/power-management.c | 8 |
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__) |