summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/printf.c')
-rw-r--r--stmhal/printf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stmhal/printf.c b/stmhal/printf.c
index fed57a7762..87cf4f0f9e 100644
--- a/stmhal/printf.c
+++ b/stmhal/printf.c
@@ -62,6 +62,7 @@ int DEBUG_printf(const char *fmt, ...) {
#endif
// need this because gcc optimises printf("%c", c) -> putchar(c), and printf("a") -> putchar('a')
+#undef putchar // Some stdlibs have a #define for putchar
int putchar(int c) {
char chr = c;
mp_hal_stdout_tx_strn_cooked(&chr, 1);