From 7d04ab445644ebbca5772f3510fdcc87e3517f4f Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 12 Feb 2022 16:22:03 +0000 Subject: [PATCH] for non-SUSPEND kernel, put the ioctl pieces entirely inside #ifdef --- sys/arch/macppc/dev/apm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/arch/macppc/dev/apm.c b/sys/arch/macppc/dev/apm.c index e90aa44f3d1..8642cf49896 100644 --- a/sys/arch/macppc/dev/apm.c +++ b/sys/arch/macppc/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.26 2022/02/11 01:55:12 deraadt Exp $ */ +/* $OpenBSD: apm.c,v 1.27 2022/02/12 16:22:03 deraadt Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -214,17 +214,16 @@ apmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) return ENXIO; switch (cmd) { - /* some ioctl names from linux */ +#ifdef SUSPEND case APM_IOC_STANDBY: case APM_IOC_SUSPEND: if ((flag & FWRITE) == 0) { error = EBADF; break; } -#ifdef SUSPEND sleep_state(sc, SLEEP_SUSPEND); -#endif break; +#endif case APM_IOC_PRN_CTL: if ((flag & FWRITE) == 0) error = EBADF; -- 2.20.1