wmbattery: Avoid redefinition of apm_read/apm_exists in *BSD.

The two functions are defined if the BSD-specific apm headers are found and
if libapm is not found.  Both of these conditions will be true on BSD
systems, so we use #elif instead of the separate #if statements.
This commit is contained in:
Doug Torrance 2015-02-19 23:34:20 -06:00 committed by Carlos R. Mafra
parent 535b83d232
commit afdfdc07eb

View file

@ -147,8 +147,7 @@ int apm_exists(void)
return 0;
return apm_read(&i);
}
#endif
#if !defined(HAVE_LIBAPM)
#elif !defined(HAVE_LIBAPM)
int apm_read(apm_info *i)
{
return -1;