From 7d91af4cc2cec83a94c071ec5ca61c32f8e94b0d Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 9 Feb 2024 15:10:18 +0100 Subject: [PATCH] fixup! sys/stdio: add common stdio module --- sys/stdio/stdio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/stdio/stdio.c b/sys/stdio/stdio.c index d789f93634077..11fb6c5cf739c 100644 --- a/sys/stdio/stdio.c +++ b/sys/stdio/stdio.c @@ -55,8 +55,13 @@ void stdio_close(void) { } } } + +#define MAYBE_WEAK +#else +#define MAYBE_WEAK __attribute__((weak)) #endif +MAYBE_WEAK ssize_t stdio_read(void* buffer, size_t len) { if (!IS_USED(MODULE_STDIN)) { @@ -67,6 +72,7 @@ ssize_t stdio_read(void* buffer, size_t len) } #if IS_USED(MODULE_STDIO_AVAILABLE) +MAYBE_WEAK int stdio_available(void) { return tsrb_avail(&stdin_isrpipe.tsrb);