From 9da47925f0b0bb6cbcce2625d187bbb9d630a78c Mon Sep 17 00:00:00 2001 From: kib Date: Mon, 25 Nov 2019 14:16:41 +0000 Subject: [PATCH] Limit bus_dma_dmar_set_buswide() definition to kernel only. The header is abused for inclusion into userspace, and on stable branches neither device_t nor bool types are not defined when used from userspace. Sponsored by: The FreeBSD Foundation X-MFC after: now --- sys/x86/include/bus_dma.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/x86/include/bus_dma.h b/sys/x86/include/bus_dma.h index 016c0fac85d8..320e3ef04e35 100644 --- a/sys/x86/include/bus_dma.h +++ b/sys/x86/include/bus_dma.h @@ -191,7 +191,9 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map, return (tc->impl->map_complete(dmat, map, segs, nsegs, error)); } +#ifdef _KERNEL bool bus_dma_dmar_set_buswide(device_t dev); +#endif #endif /* !_X86_BUS_DMA_H_ */