Date: Sun, 6 Jan 2008 19:34:00 GMT From: Bernhard Froehlich <decke@bluelife.at> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/119393: sysutils/xfce4-battery-plugin: Fix build on amd64 Message-ID: <200801061934.m06JY0kC032872@www.freebsd.org> Resent-Message-ID: <200801061940.m06Je1hf085797@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801061934.m06JY0kC032872>