summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/rewind.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/rewind.c')
-rw-r--r--lib/libc/stdio/rewind.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/stdio/rewind.c b/lib/libc/stdio/rewind.c
new file mode 100644
index 00000000..b047fa41
--- /dev/null
+++ b/lib/libc/stdio/rewind.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+void rewind(FILE *stream)
+{
+ fseek(stream, 0L, SEEK_SET);
+ clearerr(stream);
+}