From e2e69291ee6031eccf50113fdd12099a1a7d44ba Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Thu, 18 Jan 2024 19:10:47 +0100 Subject: headers: don't depend on errno.h being available 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 Reviewed-by: Francesco Dolcini Reviewed-by: Tom Rini --- include/sysinfo.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sysinfo.h') diff --git a/include/sysinfo.h b/include/sysinfo.h index f2c1aa29d18..524c7d6b223 100644 --- a/include/sysinfo.h +++ b/include/sysinfo.h @@ -7,6 +7,8 @@ #ifndef __SYSINFO_H__ #define __SYSINFO_H__ +#include + struct udevice; /* -- cgit v1.2.3