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/hwspinlock.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hwspinlock.h') diff --git a/include/hwspinlock.h b/include/hwspinlock.h index d8556c0b4b4..dd5135442ec 100644 --- a/include/hwspinlock.h +++ b/include/hwspinlock.h @@ -6,6 +6,8 @@ #ifndef _HWSPINLOCK_H_ #define _HWSPINLOCK_H_ +#include + /** * Implement a hwspinlock uclass. * Hardware spinlocks are used to perform hardware protection of -- cgit v1.2.3