Subject: mpbios compilation problem fix
To: None <current-users@netbsd.org>
From: Juraj Hercek <nbsd@hck.sk>
List: current-users
Date: 04/28/2007 13:53:41
This is a multi-part message in MIME format.
--------------080305070700050502010705
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I'm experiencing compilation problems when building custom xen3 dom0 
server - unused variable warning stops the compilation. I have attached 
the fix to this problem. It would be fine if someone commits this to the 
current source tree.

Bye,
Juraj

--------------080305070700050502010705
Content-Type: text/x-patch;
 name="mpbios_fix.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mpbios_fix.diff"

Index: sys/arch/x86/x86/mpbios.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/mpbios.c,v
retrieving revision 1.35
diff -u -r1.35 mpbios.c
--- sys/arch/x86/x86/mpbios.c	5 Mar 2007 16:51:03 -0000	1.35
+++ sys/arch/x86/x86/mpbios.c	28 Apr 2007 11:49:07 -0000
@@ -1011,7 +1011,6 @@
 mpbios_ioapic(const uint8_t *ent, struct device *self)
 {
 	const struct mpbios_ioapic *entry = (const struct mpbios_ioapic *)ent;
-	int locs[IOAPICBUSCF_NLOCS];
 
 	/* XXX let flags checking happen in ioapic driver.. */
 	if (!(entry->apic_flags & IOAPICENTRY_FLAG_EN))
@@ -1021,6 +1020,7 @@
 
 #if NIOAPIC > 0
 	{
+	int locs[IOAPICBUSCF_NLOCS];
 	struct apic_attach_args aaa;
 	aaa.apic_id = entry->apic_id;
 	aaa.apic_version = entry->apic_version;

--------------080305070700050502010705--