Index: uspace/lib/c/generic/io/io.c
===================================================================
--- uspace/lib/c/generic/io/io.c	(revision df2e5514fa8f0044ee3ce752a6fd5cf72425718e)
+++ uspace/lib/c/generic/io/io.c	(revision 1c7f38170ae59d6ce57e8d9dc903fba31f74ad15)
@@ -799,5 +799,5 @@
 }
 
-int fseek(FILE *stream, long offset, int whence)
+int fseek64(FILE *stream, off64_t offset, int whence)
 {
 	errno_t rc;
@@ -837,10 +837,6 @@
 }
 
-long ftell(FILE *stream)
-{
-	/* The native position is too large for the C99-ish interface. */
-	if (stream->pos - stream->ungetc_chars > LONG_MAX)
-		return EOF;
-
+off64_t ftell64(FILE *stream)
+{
 	if (stream->error)
 		return EOF;
@@ -853,4 +849,20 @@
 
 	return stream->pos - stream->ungetc_chars;
+}
+
+int fseek(FILE *stream, long offset, int whence)
+{
+	return fseek64(stream, offset, whence);
+}
+
+long ftell(FILE *stream)
+{
+	off64_t off = ftell64(stream);
+
+	/* The native position is too large for the C99-ish interface. */
+	if (off > LONG_MAX)
+		return EOF;
+
+	return off;
 }
 
Index: uspace/lib/c/include/stdio.h
===================================================================
--- uspace/lib/c/include/stdio.h	(revision df2e5514fa8f0044ee3ce752a6fd5cf72425718e)
+++ uspace/lib/c/include/stdio.h	(revision 1c7f38170ae59d6ce57e8d9dc903fba31f74ad15)
@@ -158,4 +158,9 @@
 extern char *gets(char *, size_t);
 
+#include <offset.h>
+
+extern int fseek64(FILE *, off64_t, int);
+extern off64_t ftell64(FILE *);
+
 #endif
 
