Re: git: 820401bf1769 - main - nl_types.h: explicitly include cdefs.h

From: Warner Losh <imp_at_bsdimp.com>
Date: Thu, 25 Jan 2024 01:24:26 UTC
This was one of the things i wanted to comment on the that review.

This change should be done as a special Linux sys/param.h that includes
ctypes.h and then includes the next sys/param.h.

A large number of the changes from that review are similar and i wanted yo
think through the right solution.

This is fragile: I'm likely to remove it again because it violates style(9)
and has no docs around it.

Warner

On Wed, Jan 24, 2024, 3:05 PM Ed Maste <emaste@freebsd.org> wrote:

> The branch main has been updated by emaste:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=820401bf176996e41091d2e4190aded12a966b1d
>
> commit 820401bf176996e41091d2e4190aded12a966b1d
> Author:     Val Packett <val@packett.cool>
> AuthorDate: 2024-01-16 18:42:26 +0000
> Commit:     Ed Maste <emaste@FreeBSD.org>
> CommitDate: 2024-01-24 21:59:18 +0000
>
>     nl_types.h: explicitly include cdefs.h
>
>     This file uses __BEGIN_DECLS/__END_DECLS. When bootstrapping from
>     Linux/musl, they were missing.
>
>     Sponsored by:   https://www.patreon.com/valpackett
>     Pull Request:   https://github.com/freebsd/freebsd-src/pull/1066
> ---
>  include/nl_types.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/nl_types.h b/include/nl_types.h
> index 120d1911631f..6ba15132126d 100644
> --- a/include/nl_types.h
> +++ b/include/nl_types.h
> @@ -34,6 +34,7 @@
>  #ifndef _NL_TYPES_H_
>  #define _NL_TYPES_H_
>
> +#include <sys/cdefs.h>
>  #include <sys/types.h>
>
>  #ifdef _NLS_PRIVATE
>