Synopsis:      i386 5.6 and current does not compile without ACPI
Category:      kernel
Environment:
        System      : OpenBSD 5.6
        Details     : OpenBSD 5.6-stable (THESTONE) #0: Sat Jan 17
16:36:05 CET 2015

[email protected]:/usr/src/sys/arch/i386/compile/THESTONE

        Architecture: OpenBSD.i386
        Machine     : i386
Description:
        5.6 and -current does not compile with acpi disabled (NACPI = 0)
        due to an unused variable. The variable usage is behind #if
NACPI > 0 but             the declaration is not.
How-To-Repeat:
        Remove acpi0   at bios? from config file and try to compile.
Fix:

This patch makes it compile, but I am unsure of style etc.
Also, this is not critical as GENERIC compiles fine ;)
I just run this on a very old system and try to minimize the kernel.

Index: sys/arch/i386/i386/bios.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/bios.c,v
retrieving revision 1.104
diff -u -p -u -r1.104 bios.c
--- sys/arch/i386/i386/bios.c   29 Mar 2014 18:09:29 -0000      1.104
+++ sys/arch/i386/i386/bios.c   17 Jan 2015 17:11:47 -0000
@@ -169,7 +169,11 @@ biosattach(struct device *parent, struct
        struct smbtable bios;
        volatile u_int8_t *va;
        char scratch[64], *str;
-       int flags, smbiosrev = 0, ncpu = 0, usingacpi = 0;
+       int flags, smbiosrev = 0, ncpu = 0;
+#if NACPI > 0
+       int usingacpi = 0;
+#endif
+

        /* remember flags */
        flags = sc->sc_dev.dv_cfdata->cf_flags;

Reply via email to