summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>1999-02-23 21:18:28 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>1999-02-23 21:18:28 +0000
commitf6b521fece51f2f259178fe4524e51ceeb5129e5 (patch)
treeb87a1934c728aae24504fd9cf8ca3369bb386d75 /sys
parentc052abb68858ed931e70cb135daeef61981e9d94 (diff)
Make ampwarn access conditional upon NAPM so kernels that do
not define the apm device build again (sorry)
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/machdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 7a06071f5b4..d4df9ea63cd 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.98 1999/02/23 04:10:12 marc Exp $ */
+/* $OpenBSD: machdep.c,v 1.99 1999/02/23 21:18:27 marc Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -1940,7 +1940,9 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
extern char cpu_vendor[];
extern int cpu_id;
extern int cpu_feature;
+#if NAPM > 0
extern int cpu_apmwarn;
+#endif
dev_t dev;
switch (name[0]) {
@@ -1985,8 +1987,10 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
return (sysctl_rdint(oldp, oldlenp, newp, cpu_id));
case CPU_CPUFEATURE:
return (sysctl_rdint(oldp, oldlenp, newp, cpu_feature));
+#if NAPM > 0
case CPU_APMWARN:
return (sysctl_int(oldp, oldlenp, newp, newlen, &cpu_apmwarn));
+#endif
default:
return EOPNOTSUPP;
}