errno: Avoid including strings in SPL

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@chromium.org>
This commit is contained in:
Simon Glass 2022-02-28 12:08:21 -07:00 committed by Tom Rini
parent 3390948c0f
commit 64aefc4800

View File

@ -25,7 +25,7 @@ extern int errno __errno_asm_label;
* Return: string describing the error. If CONFIG_ERRNO_STR is not * Return: string describing the error. If CONFIG_ERRNO_STR is not
* defined an empty string is returned. * defined an empty string is returned.
*/ */
#ifdef CONFIG_ERRNO_STR #if CONFIG_IS_ENABLED(ERRNO_STR)
const char *errno_str(int errno); const char *errno_str(int errno);
#else #else
static const char error_message[] = ""; static const char error_message[] = "";