Index | Thread | Search

From:
"Theo de Raadt" <deraadt@openbsd.org>
Subject:
Re: dt: Add missing include
To:
Christian Ludwig <christian_ludwig@genua.de>
Cc:
tech@openbsd.org
Date:
Fri, 02 Feb 2024 09:11:00 -0700

Download raw body.

Thread
In the kernel, this is handled by <sys/param.h> inclusion as the legacy
access pattern.

In userland, all the current includers are pulling <limits.h>

This kind of "all include files pull all the include files for all the
things they use" is not a normal pattern, it is actually an anti-pattern
because eventually 80% of include files would include the other 80% of
include files, it turns into a heavy load for cpp.

So can you tell us why you encountered this?

Christian Ludwig <christian_ludwig@genua.de> wrote:

> The header uses _MAXCOMLEN without including its definition.
> ---
>  sys/dev/dt/dtvar.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sys/dev/dt/dtvar.h b/sys/dev/dt/dtvar.h
> index 9b5d3de08ee..171f2f774b1 100644
> --- a/sys/dev/dt/dtvar.h
> +++ b/sys/dev/dt/dtvar.h
> @@ -21,6 +21,7 @@
>  
>  #include <sys/ioccom.h>
>  #include <sys/stacktrace.h>
> +#include <sys/syslimits.h>
>  #include <sys/time.h>
>  
>  /*
> -- 
> 2.34.1
>