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/spi-mem.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/spi-mem.h') diff --git a/include/spi-mem.h b/include/spi-mem.h index b07cf2ed83d..3c8e95b6f53 100644 --- a/include/spi-mem.h +++ b/include/spi-mem.h @@ -11,6 +11,8 @@ #ifndef __UBOOT_SPI_MEM_H #define __UBOOT_SPI_MEM_H +#include + struct udevice; #define SPI_MEM_OP_CMD(__opcode, __buswidth) \ -- cgit