Index: uspace/lib/libc/generic/io/io.c
===================================================================
--- uspace/lib/libc/generic/io/io.c	(revision 61001a9defa8a06128475b5d909949241e85057e)
+++ uspace/lib/libc/generic/io/io.c	(revision f389409f87a298e33da4584fafa80ff73cc3c7da)
@@ -536,4 +536,31 @@
 }
 
+char *fgets(char *str, int size, FILE *stream)
+{
+	char c;
+	int idx;
+
+	idx = 0;
+	while (idx < size - 1) {
+		c = fgetc(stream);
+		if (c == EOF)
+			break;
+
+		str[idx++] = c;
+
+		if (c == '\n')
+			break;
+	}
+
+	if (ferror(stream))
+		return NULL;
+
+	if (idx == 0)
+		return NULL;
+
+	str[idx] = '\0';
+	return str;
+}
+
 int getchar(void)
 {
Index: uspace/lib/libc/include/stdio.h
===================================================================
--- uspace/lib/libc/include/stdio.h	(revision 61001a9defa8a06128475b5d909949241e85057e)
+++ uspace/lib/libc/include/stdio.h	(revision f389409f87a298e33da4584fafa80ff73cc3c7da)
@@ -110,5 +110,5 @@
 /* Character and string input functions */
 extern int fgetc(FILE *);
-extern char *fgets(char *, size_t, FILE *);
+extern char *fgets(char *, int, FILE *);
 
 extern int getchar(void);
