[PATCH] headers: don't depend on errno.h being available
Tom Rini
trini at konsulko.com
Thu Jan 25 17:14:24 CET 2024
On Thu, Jan 18, 2024 at 07:10:47PM +0100, max.oss.09 at gmail.com wrote:
> From: Max Krummenacher <max.krummenacher at toradex.com>
>
> These headers follow the pattern:
>
> | #if CONFIG_IS_ENABLED(FANCY_FEATURE)
> | void foo(void);
> | #else
> | static inline void foo(void) { return -ENOSYS; }
> | #endif
>
> In the #else path ENOSYS is used, however linux/errno.h is not included.
> If errno.h has not been included already the compiler errors out even
> if the inline function is not referenced.
>
> Make those headers self contained.
>
> Signed-off-by: Max Krummenacher <max.krummenacher at toradex.com>
> Reviewed-by: Francesco Dolcini <francesco.dolcini at toradex.com>
> Reviewed-by: Tom Rini <trini at konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240125/c5669bbb/attachment.sig>
More information about the U-Boot
mailing list