aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-11-20 13:28:33 +0100
committerSimon Glass <sjg@chromium.org>2021-12-02 09:15:43 -0700
commit34bee10e00bc77bbe4287abe15a16f3048085424 (patch)
treeaf0a2fe24c63238f3ee29e183a238d9156568b18 /arch
parentfe67ba7418a1d31341a766b3f01833803dcba4f5 (diff)
downloadu-boot-34bee10e00bc77bbe4287abe15a16f3048085424.zip
u-boot-34bee10e00bc77bbe4287abe15a16f3048085424.tar.gz
u-boot-34bee10e00bc77bbe4287abe15a16f3048085424.tar.bz2
sandbox: replace putchar(ch) by fputc(ch, stdout)
When compiled with -Og for better debugability u-boot ends up in a stack overflow using gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0 GNU Binutils for Ubuntu 2.37 putchar(ch) is defined as a macro which ends up calling U-Boot's putc() implementation instead of the glibc one, which calls os_putc() ... Let's use fputc(ch, stdout) instead as fputc() does not exist in U-Boot. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/cpu/os.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index 873f85a..6837bfc 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -638,7 +638,7 @@ int os_get_filesize(const char *fname, loff_t *size)
void os_putc(int ch)
{
- putchar(ch);
+ fputc(ch, stdout);
}
void os_puts(const char *str)