[Xfce4-commits] <xfce4-battery-plugin:master> Fix compilation on amd64 FreeBSD

Florian Rivoal noreply at xfce.org
Mon Dec 27 15:50:02 CET 2010


Updating branch refs/heads/master
         to 80099a38ab041cb167a48c3228df26f2d6297a3f (commit)
       from 5c2c7c2fda2288a576768d5b97aeb65e67339540 (commit)

commit 80099a38ab041cb167a48c3228df26f2d6297a3f
Author: Florian Rivoal <frivoal at xfce.org>
Date:   Sat Dec 25 13:05:06 2010 +0900

    Fix compilation on amd64 FreeBSD
    
    Adapted from the patch in bug #3811

 panel-plugin/battery.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
index 0b875af..a14c92b 100644
--- a/panel-plugin/battery.c
+++ b/panel-plugin/battery.c
@@ -25,7 +25,7 @@
 #include <config.h>
 #endif
 
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && (defined(i386) || defined(__i386__))
 #include <machine/apm_bios.h>
 #elif __OpenBSD__
 #include <sys/param.h>
@@ -163,7 +163,9 @@ detect_battery_info(t_battmon *battmon)
      except that is does not work on FreeBSD
 
   */
+#ifdef APMDEVICE
     struct apm_info apm;
+#endif
       int fd;
 
     /* First check to see if ACPI is available */
@@ -310,7 +312,9 @@ update_apm_status(t_battmon *battmon)
       acline = apm.ac_state ? TRUE : FALSE;
 
 #else
+#ifdef __linux__ || APMDEVICE
     struct apm_info apm;
+#endif
     DBG ("Updating battery status...");
 
     if(battmon->method == BM_BROKEN) {



More information about the Xfce4-commits mailing list