summaryrefslogtreecommitdiff
path: root/common/cli_readline.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-10-07 19:11:48 +0300
committerTom Rini <trini@konsulko.com>2020-10-22 16:54:53 +0300
commitc670aeee3df9186902dba07b76bd2de0776df390 (patch)
tree8e61521f5bd9d6e01af762785307ad7c84d91c43 /common/cli_readline.c
parent8d5d97cb28bf2ac1e0d7e4b24620c56f3fe45e6f (diff)
downloadu-boot-c670aeee3df9186902dba07b76bd2de0776df390.tar.xz
common: rename getc() to getchar()
The sandbox is built with the SDL2 library with invokes the X11 library which in turn calls getc(). But getc() in glibc is defined as int getc(FILE *) This does not match our definition. int getc(void) The sandbox crashes when called with parameter -l. Rename our library symbol getc() to getchar(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cli_readline.c')
-rw-r--r--common/cli_readline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/cli_readline.c b/common/cli_readline.c
index 1f1e28c6d8..47b876285c 100644
--- a/common/cli_readline.c
+++ b/common/cli_readline.c
@@ -68,7 +68,7 @@ static char *delete_char (char *buffer, char *p, int *colp, int *np, int plen)
#define CREAD_HIST_CHAR ('!')
#define getcmd_putch(ch) putc(ch)
-#define getcmd_getch() getc()
+#define getcmd_getch() getchar()
#define getcmd_cbeep() getcmd_putch('\a')
#define HIST_MAX 20
@@ -571,7 +571,7 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer,
return -2; /* timed out */
WATCHDOG_RESET(); /* Trigger watchdog, if needed */
- c = getc();
+ c = getchar();
/*
* Special character handling