diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-10-07 18:11:48 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-10-22 09:54:53 -0400 |
commit | c670aeee3df9186902dba07b76bd2de0776df390 (patch) | |
tree | 8e61521f5bd9d6e01af762785307ad7c84d91c43 /drivers | |
parent | 8d5d97cb28bf2ac1e0d7e4b24620c56f3fe45e6f (diff) | |
download | u-boot-c670aeee3df9186902dba07b76bd2de0776df390.zip u-boot-c670aeee3df9186902dba07b76bd2de0776df390.tar.gz u-boot-c670aeee3df9186902dba07b76bd2de0776df390.tar.bz2 |
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 'drivers')
-rw-r--r-- | drivers/ddr/fsl/main.c | 2 | ||||
-rw-r--r-- | drivers/ram/stm32mp1/stm32mp1_interactive.c | 2 | ||||
-rw-r--r-- | drivers/serial/serial-uclass.c | 2 | ||||
-rw-r--r-- | drivers/serial/serial.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c index 84139b8..c02badd 100644 --- a/drivers/ddr/fsl/main.c +++ b/drivers/ddr/fsl/main.c @@ -705,7 +705,7 @@ phys_size_t __fsl_ddr_sdram(fsl_ddr_info_t *pinfo) /* Compute it once normally. */ #ifdef CONFIG_FSL_DDR_INTERACTIVE - if (tstc() && (getc() == 'd')) { /* we got a key press of 'd' */ + if (tstc() && (getchar() == 'd')) { /* we got a key press of 'd' */ total_memory = fsl_ddr_interactive(pinfo, 0); } else if (fsl_ddr_interactive_env_var_exists()) { total_memory = fsl_ddr_interactive(pinfo, 1); diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c index 38390c0..5a5d067 100644 --- a/drivers/ram/stm32mp1/stm32mp1_interactive.c +++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c @@ -394,7 +394,7 @@ bool stm32mp1_ddr_interactive(void *priv, unsigned long start = get_timer(0); while (1) { - if (tstc() && (getc() == 'd')) { + if (tstc() && (getchar() == 'd')) { next_step = STEP_DDR_RESET; break; } diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index 0027625..f3c25d4 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -413,7 +413,7 @@ static int on_baudrate(const char *name, const char *value, enum env_op op, if ((flags & H_INTERACTIVE) != 0) while (1) { - if (getc() == '\r') + if (getchar() == '\r') break; } diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 53358ac..355659b 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -90,7 +90,7 @@ static int on_baudrate(const char *name, const char *value, enum env_op op, if ((flags & H_INTERACTIVE) != 0) while (1) { - if (getc() == '\r') + if (getchar() == '\r') break; } |