wmbattery: make it work without libapm
libapm and apm.h are not necessarily available on Linux either so make it work without.
This commit is contained in:
parent
8345c9ca76
commit
bdc9f33956
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue