ports/119393: sysutils/xfce4-battery-plugin: Fix build on amd64
Bernhard Froehlich
decke at bluelife.at
Sun Jan 6 19:40:02 UTC 2008
>Number: 119393
>Category: ports
>Synopsis: sysutils/xfce4-battery-plugin: Fix build on amd64
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 06 19:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Bernhard Froehlich
>Release: FreeBSD 7.0-RC1/AMD64
>Organization:
>Environment:
FreeBSD chii.bluelife.at 7.0-RC1 FreeBSD 7.0-RC1 #1: Sat Dec 29 12:29:16 CET 2007 decke at chii.bluelife.at:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
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.
>How-To-Repeat:
>Fix:
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) {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list