Skip to content

Commit

Permalink
Merge pull request #21040 from mguetschow/stdio-available
Browse files Browse the repository at this point in the history
sys/stdio: stdio_available is always false with missing stdin module
  • Loading branch information
benpicco authored Nov 26, 2024
2 parents b69d060 + 5715828 commit 5e6e34e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys/stdio/stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5e6e34e

Please sign in to comment.