* [PATCH] pbl: console: fix undefined reference to vprintf()
@ 2026-03-04 10:49 Sascha Hauer
2026-03-05 6:39 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2026-03-04 10:49 UTC (permalink / raw)
To: Barebox List
panic() now uses vprintf() which is not available without
CONFIG_PBL_CONSOLE. Move the declaration to the right ifdeffery
which already handles that case.
Fixes: 33e3bc4782 ("pbl: fix panic() message printing")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/stdio.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/stdio.h b/include/stdio.h
index 945ec46926..4c0dff0c00 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -12,10 +12,8 @@
/* stdin */
int tstc(void);
int getchar(void);
-int vprintf(const char *fmt, va_list args);
#else
static inline int tstc(void) { return 0; }
-static inline int vprintf(const char *fmt, va_list args) { return 0; }
static inline int getchar(void) { return -EINVAL; }
#endif
@@ -23,11 +21,13 @@ int readline(const char *prompt, char *buf, int len);
#if (IN_PROPER && !defined(CONFIG_CONSOLE_NONE)) || \
(IN_PBL && defined(CONFIG_PBL_CONSOLE))
+int vprintf(const char *fmt, va_list args);
static inline int puts(const char *s) { return console_puts(CONSOLE_STDOUT, s); }
static inline void putchar(char c) { console_putc(CONSOLE_STDOUT, c); }
#else
static inline int puts(const char *s) { return 0; }
static inline void putchar(char c) {}
+static inline int vprintf(const char *fmt, va_list args) { return 0; }
#endif
int readline(const char *prompt, char *buf, int len);
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-05 6:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-04 10:49 [PATCH] pbl: console: fix undefined reference to vprintf() Sascha Hauer
2026-03-05 6:39 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox