diff options
author | miwi <miwi@FreeBSD.org> | 2008-01-21 20:33:19 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2008-01-21 20:33:19 +0800 |
commit | 71dc698272ef6b4ca671187f773200e395104f27 (patch) | |
tree | ac3430bd43e6d938940bf5c1592037a5a67369a5 /sysutils/xfce4-battery-plugin | |
parent | 55af7491fcb124164317780c5578bfdf58229e18 (diff) | |
download | freebsd-ports-gnome-71dc698272ef6b4ca671187f773200e395104f27.tar.gz freebsd-ports-gnome-71dc698272ef6b4ca671187f773200e395104f27.tar.zst freebsd-ports-gnome-71dc698272ef6b4ca671187f773200e395104f27.zip |
The battery plugin is currently i386 only and failes to
build on amd64 because apm is not available there. This patch
enables apm only for i386 and fixes some apm variable declarations
which makes it build and usable on amd64.
PR: 119393
Submitted by: Bernhard Froehlich <decke@bluelife.at>
Diffstat (limited to 'sysutils/xfce4-battery-plugin')
-rw-r--r-- | sysutils/xfce4-battery-plugin/files/patch-panel-plug-battery.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sysutils/xfce4-battery-plugin/files/patch-panel-plug-battery.c b/sysutils/xfce4-battery-plugin/files/patch-panel-plug-battery.c new file mode 100644 index 000000000000..0841aa95cda5 --- /dev/null +++ b/sysutils/xfce4-battery-plugin/files/patch-panel-plug-battery.c @@ -0,0 +1,37 @@ + + +Patch attached with submission follows: + +--- panel-plugin/battery.c (revision 3756) ++++ panel-plugin/battery.c (working copy) +@@ -25,7 +25,7 @@ + #include <config.h> + #endif + +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__)) + #include <machine/apm_bios.h> + #elif __OpenBSD__ + #include <sys/param.h> +@@ -163,7 +163,9 @@ + 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 @@ + acline = apm.ac_state ? TRUE : FALSE; + + #else ++#ifdef APMDEVICE + struct apm_info apm; ++#endif + DBG ("Updating battery status..."); + + if(battmon->method == BM_BROKEN) { + + |