[PATCH 04/18] errno: Avoid including strings in SPL

Simon Glass sjg at chromium.org
Mon Feb 28 20:08:21 CET 2022

At present the header file defines this function in SPL but the file may
not actually be built. This causes a build error if the option is enabled.

Fix the condition in the header file.

Signed-off-by: Simon Glass <sjg at chromium.org>

 include/errno.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/errno.h b/include/errno.h
index 652ad67306..5a8816d0a1 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -25,7 +25,7 @@ extern int errno __errno_asm_label;
  * Return:	string describing the error. If CONFIG_ERRNO_STR is not
  *		defined an empty string is returned.
 const char *errno_str(int errno);
 static const char error_message[] = "";

More information about the U-Boot mailing list