From f56b290df60d4a6837f024ca42024b67af06212a Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 4 Jan 2022 20:41:42 +0000 Subject: [PATCH] hide more things behind _KERNEL, in case userland manages to include this file --- sys/arch/alpha/include/bus.h | 6 +++++- sys/arch/landisk/include/bus.h | 6 +++++- sys/arch/sparc64/include/bus.h | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sys/arch/alpha/include/bus.h b/sys/arch/alpha/include/bus.h index 653a141df1a..9854a7bf392 100644 --- a/sys/arch/alpha/include/bus.h +++ b/sys/arch/alpha/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.32 2019/05/13 21:27:59 mpi Exp $ */ +/* $OpenBSD: bus.h,v 1.33 2022/01/04 20:41:42 deraadt Exp $ */ /* $NetBSD: bus.h,v 1.10 1996/12/02 22:19:32 cgd Exp $ */ /* @@ -31,6 +31,8 @@ #ifndef _MACHINE_BUS_H_ #define _MACHINE_BUS_H_ +#ifdef _KERNEL + /* * Addresses (in bus space). */ @@ -698,4 +700,6 @@ paddr_t _bus_dmamem_mmap(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs, off_t off, int prot, int flags); #endif /* _ALPHA_BUS_DMA_PRIVATE */ +#endif /* _KERNEL */ + #endif /* _MACHINE_BUS_H_ */ diff --git a/sys/arch/landisk/include/bus.h b/sys/arch/landisk/include/bus.h index ac2a21e66f1..e5447737580 100644 --- a/sys/arch/landisk/include/bus.h +++ b/sys/arch/landisk/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.9 2017/05/08 00:27:45 dlg Exp $ */ +/* $OpenBSD: bus.h,v 1.10 2022/01/04 20:41:44 deraadt Exp $ */ /* $NetBSD: bus.h,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ /*- @@ -65,6 +65,8 @@ #ifndef _MACHINE_BUS_H_ #define _MACHINE_BUS_H_ +#ifdef _KERNEL + #include typedef u_long bus_addr_t; @@ -590,4 +592,6 @@ paddr_t _bus_dmamem_mmap(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs, off_t off, int prot, int flags); #endif /* _LANDISK_BUS_DMA_PRIVATE */ +#endif /* _KERNEL */ + #endif /* _MACHINE_BUS_H_ */ diff --git a/sys/arch/sparc64/include/bus.h b/sys/arch/sparc64/include/bus.h index cd2710feb82..3f990d6572f 100644 --- a/sys/arch/sparc64/include/bus.h +++ b/sys/arch/sparc64/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.34 2020/06/23 01:21:29 jmatthew Exp $ */ +/* $OpenBSD: bus.h,v 1.35 2022/01/04 20:41:44 deraadt Exp $ */ /* $NetBSD: bus.h,v 1.31 2001/09/21 15:30:41 wiz Exp $ */ /*- @@ -68,6 +68,8 @@ #include +#ifdef _KERNEL + /* * Debug hooks */ @@ -648,5 +650,7 @@ struct sparc_bus_dmamap { bus_dma_segment_t dm_segs[1]; /* segments; variable length */ }; +#endif /* _KERNEL */ + #endif /* _MACHINE_BUS_H_ */ -- 2.20.1