summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-05-08 16:55:18 -0600
committerTom Warren <twarren@nvidia.com>2016-07-05 13:19:08 -0700
commit862887d8836643e316cd019b93b1732971c8aaf8 (patch)
tree30096704913ded1105c10284aa441a937ab0c5e6 /include
parent00e9e6d1ffb9786a7ca42cc41f5320303c1ab84f (diff)
downloadtalos-obmc-uboot-862887d8836643e316cd019b93b1732971c8aaf8.tar.gz
talos-obmc-uboot-862887d8836643e316cd019b93b1732971c8aaf8.zip
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 <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/errno.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/errno.h b/include/errno.h
index 39426818e0..15ece2f97f 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 */
OpenPOWER on IntegriCloud