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.
---
wmbattery/wmbattery.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/wmbattery/wmbattery.c b/wmbattery/wmbattery.c
index 1c74409..a7b752f 100644
--- a/wmbattery/wmbattery.c
+++ b/wmbattery/wmbattery.c
@@ -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;
--
2.1.0
--
To unsubscribe, send mail to [email protected].