summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/clearerr_unlocked.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/clearerr_unlocked.c')
-rw-r--r--lib/libc/stdio/clearerr_unlocked.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libc/stdio/clearerr_unlocked.c b/lib/libc/stdio/clearerr_unlocked.c
new file mode 100644
index 00000000..da4ea106
--- /dev/null
+++ b/lib/libc/stdio/clearerr_unlocked.c
@@ -0,0 +1,8 @@
+#include <__stdio.h>
+#include <stdio.h>
+
+void clearerr_unlocked(FILE *stream)
+{
+ if (stream != NULL)
+ stream->flags &= ~(_IO_ERR | _IO_EOF);
+}