summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/fgets_unlocked.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/fgets_unlocked.c')
-rw-r--r--lib/libc/stdio/fgets_unlocked.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/stdio/fgets_unlocked.c b/lib/libc/stdio/fgets_unlocked.c
new file mode 100644
index 00000000..9e2dca60
--- /dev/null
+++ b/lib/libc/stdio/fgets_unlocked.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+char *fgets_unlocked(char *s, int n, FILE *stream)
+{
+ return fread_unlocked(s, 1, n, stream) ? s : NULL;
+}