summaryrefslogtreecommitdiff
path: root/userland/libc/stdio/fflush.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-11-22 21:07:36 +0100
committerAnton Kling <anton@kling.gg>2023-11-22 21:07:36 +0100
commitbf2d121899c028eed140b679b4e059db8af91fe8 (patch)
tree3e3fe6cc4c6cfe7090fb8ab8a2141f8ad9788631 /userland/libc/stdio/fflush.c
parentf0af695b6c3289a041e8fce8926721063796c596 (diff)
LibC: Add fflush() and buffer writes to file descriptors
Diffstat (limited to 'userland/libc/stdio/fflush.c')
-rw-r--r--userland/libc/stdio/fflush.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/userland/libc/stdio/fflush.c b/userland/libc/stdio/fflush.c
index 7a37c79..3042efa 100644
--- a/userland/libc/stdio/fflush.c
+++ b/userland/libc/stdio/fflush.c
@@ -2,6 +2,7 @@
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/fflush.html
int fflush(FILE *stream) {
- // FIXME: Implement
+ if (stream->fflush)
+ stream->fflush(stream);
return 0;
}