From 57158285a1b5135dc94af6ae37137ffc41b12f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikolai=20G=C3=BCtschow?= Date: Mon, 25 Nov 2024 16:19:34 +0100 Subject: [PATCH] sys/stdio: stdio_available is always false with missing stdin module --- sys/stdio/stdio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/stdio/stdio.c b/sys/stdio/stdio.c index 11fb6c5cf7..4fe196113d 100644 --- a/sys/stdio/stdio.c +++ b/sys/stdio/stdio.c @@ -75,6 +75,9 @@ ssize_t stdio_read(void* buffer, size_t len) MAYBE_WEAK int stdio_available(void) { + if (!IS_USED(MODULE_STDIN)) { + return 0; + } return tsrb_avail(&stdin_isrpipe.tsrb); } #endif