From afdfdc07ebba81a6f74515fc3dcb59a391fe9ab9 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Thu, 19 Feb 2015 23:34:20 -0600 Subject: [PATCH] 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. --- 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;