From 862887d8836643e316cd019b93b1732971c8aaf8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 May 2016 16:55:18 -0600 Subject: errno: Allow errno_str() to be used without CONFIG_ERRNO_STR The pmic framework uses errno_str() and this requires board that use it to enable CONFIG_ERRNO_STR to avoid a build error. Update the header to provide a NULL error message when CONFIG_ERRNO_STR is not defined, and fix the build error. This will show as "(null)" when U-Boot prints it. Signed-off-by: Simon Glass Signed-off-by: Tom Warren --- include/errno.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/errno.h') diff --git a/include/errno.h b/include/errno.h index 39426818e0c..15ece2f97f3 100644 --- a/include/errno.h +++ b/include/errno.h @@ -15,5 +15,10 @@ extern int errno; #ifdef CONFIG_ERRNO_STR const char *errno_str(int errno); +#else +static inline const char *errno_str(int errno) +{ + return 0; +} #endif #endif /* _ERRNO_H */ -- cgit v1.2.3