diff options
author | 1999-02-23 21:18:27 +0000 | |
---|---|---|
committer | 1999-02-23 21:18:27 +0000 | |
commit | 5feeae4d13cf4c9ff7e7328c397650ec1bc82c95 (patch) | |
tree | 0dc39daafc35bf8763e6a55204aea4b1f713cb8d | |
parent | Do a better job of reinitializing it the xl is found in powered down state. (diff) | |
download | wireguard-openbsd-5feeae4d13cf4c9ff7e7328c397650ec1bc82c95.tar.xz wireguard-openbsd-5feeae4d13cf4c9ff7e7328c397650ec1bc82c95.zip |
Make ampwarn access conditional upon NAPM so kernels that do
not define the apm device build again (sorry)
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 6 |
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; } |