[Pkg-wmaker-commits] [wmbattery] 205/241: wmbattery: make it work without libapm
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:38:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbattery.
commit ec858bcfa59736d02dce71f089c9d7280e436586
Author: Ludwig Nussel <ludwig.nussel at suse.de>
Date: Sat Jan 17 08:41:12 2015 -0600
wmbattery: make it work without libapm
libapm and apm.h are not necessarily available on Linux either so make it work
without.
---
apm.h | 2 +-
wmbattery.c | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/apm.h b/apm.h
index 381b7f7..fc2428e 100644
--- a/apm.h
+++ b/apm.h
@@ -37,7 +37,7 @@
#define BATTERY_TIME_UNKNOWN (-1)
#endif /* AC_LINE_STATUS_ON */
-#if defined (HAVE_MACHINE_APM_BIOS_H) || defined (HAVE_I386_APMVAR_H) /* BSD */
+#if !defined(HAVE_APM_H)
typedef struct {
const char driver_version[10];
int apm_version_major;
diff --git a/wmbattery.c b/wmbattery.c
index 8f9cbb5..1d45d65 100644
--- a/wmbattery.c
+++ b/wmbattery.c
@@ -148,6 +148,16 @@ int apm_exists(void)
return apm_read(&i);
}
#endif
+#if !defined(HAVE_APM_H)
+int apm_read(apm_info *i)
+{
+ return -1;
+}
+int apm_exists(void)
+{
+ return -1;
+}
+#endif
int apm_change(apm_info *cur)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git
More information about the Pkg-wmaker-commits
mailing list