From b4e4f070eacdc3873f5d6ab9728c0eaae2ff376a Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 28 Oct 2020 21:09:56 +0000 Subject: [PATCH] Note that sys/systm.h is special too If you need / want to includerd sys/systm.h, it has to be just after param.h/types.h. Document this existing practice. Not all kernel files include systm.h, but when you do, it should be done out of order. Reviewed by: vangyzen, kib, emaste Differential Review: https://reviews.freebsd.org/D26981 --- share/man/man9/style.9 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 08f874635b23..10ca64cde817 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -25,7 +25,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd July 16, 2020 +.Dd October 28, 2020 .Dt STYLE 9 .Os .Sh NAME @@ -156,9 +156,13 @@ includes .In sys/types.h ; do not include both. .Pc +Next, include +.In sys/systm.h , +if needed. The remaining kernel headers should be sorted alphabetically. .Bd -literal #include /* Non-local includes in angle brackets. */ +#include #include #include #include