From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sun, 8 May 2016 16:55:18 -0600 Subject: [U-Boot] [PATCH v2 2/6] errno: Allow errno_str() to be used without CONFIG_ERRNO_STR In-Reply-To: <1462748122-30918-1-git-send-email-sjg@chromium.org> References: <1462748122-30918-1-git-send-email-sjg@chromium.org> Message-ID: <1462748122-30918-3-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v2: - Add new patch to allow errno_str() to be used without CONFIG_ERRNO_STR include/errno.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/errno.h b/include/errno.h index 3942681..15ece2f 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 */ -- 2.8.0.rc3.226.g39d4020