Index: uspace/lib/libc/generic/io/io.c
===================================================================
--- uspace/lib/libc/generic/io/io.c	(revision bd8bfcbd5fb6cff623ea60c4cd7c2f0830500f1a)
+++ uspace/lib/libc/generic/io/io.c	(revision 080ad7fcf59dd514b2dceeb65a63f76c705addac)
@@ -193,4 +193,24 @@
 }
 
+FILE *fdopen(int fd, const char *mode)
+{
+	/* Open file. */
+	FILE *stream = malloc(sizeof(FILE));
+	if (stream == NULL) {
+		errno = ENOMEM;
+		return NULL;
+	}
+	
+	stream->fd = fd;
+	stream->error = false;
+	stream->eof = false;
+	stream->klog = false;
+	stream->phone = -1;
+	
+	list_append(&stream->link, &files);
+	
+	return stream;
+}
+
 FILE *fopen_node(fdi_node_t *node, const char *mode)
 {
@@ -379,4 +399,9 @@
 }
 
+void rewind(FILE *stream)
+{
+	(void) fseek(stream, 0, SEEK_SET);
+}
+
 int fflush(FILE *stream)
 {
Index: uspace/lib/libc/include/stdio.h
===================================================================
--- uspace/lib/libc/include/stdio.h	(revision bd8bfcbd5fb6cff623ea60c4cd7c2f0830500f1a)
+++ uspace/lib/libc/include/stdio.h	(revision 080ad7fcf59dd514b2dceeb65a63f76c705addac)
@@ -107,4 +107,5 @@
 /* File stream functions */
 extern FILE *fopen(const char *, const char *);
+extern FILE *fdopen(int, const char *);
 extern int fclose(FILE *);
 
@@ -113,4 +114,5 @@
 
 extern int fseek(FILE *, long, int);
+extern void rewind(FILE *);
 extern int ftell(FILE *);
 extern int feof(FILE *);
