Index: uspace/lib/posix/src/stdio.c
===================================================================
--- uspace/lib/posix/src/stdio.c	(revision 97b1dfc290beb228953f53022071c2f25b4686d4)
+++ uspace/lib/posix/src/stdio.c	(revision f4f4b95e62a33cdf2a50bf7841b07ccb8ade8dff)
@@ -34,4 +34,7 @@
 /** @file Standard buffered input/output.
  */
+
+#define _LARGEFILE64_SOURCE
+#undef _FILE_OFFSET_BITS
 
 #include "internal/common.h"
@@ -181,5 +184,5 @@
 int fseeko(FILE *stream, off_t offset, int whence)
 {
-	return fseek64(stream, offset, whence);
+	return fseek(stream, offset, whence);
 }
 
@@ -191,4 +194,14 @@
  */
 off_t ftello(FILE *stream)
+{
+	return ftell(stream);
+}
+
+int fseeko64(FILE *stream, off64_t offset, int whence)
+{
+	return fseek64(stream, offset, whence);
+}
+
+off64_t ftello64(FILE *stream)
 {
 	return ftell64(stream);
Index: uspace/lib/posix/src/unistd.c
===================================================================
--- uspace/lib/posix/src/unistd.c	(revision 97b1dfc290beb228953f53022071c2f25b4686d4)
+++ uspace/lib/posix/src/unistd.c	(revision f4f4b95e62a33cdf2a50bf7841b07ccb8ade8dff)
@@ -302,8 +302,8 @@
 off_t lseek(int fildes, off_t offset, int whence)
 {
-#if LONG_MAX == INT64_MAX
+#if LONG_MAX == INT_MAX
+	return _lseek(fildes, offset, LONG_MAX, whence);
+#else
 	return _lseek64(fildes, offset, whence);
-#else
-	return _lseek(fildes, offset, LONG_MAX, whence);
 #endif
 }
@@ -331,4 +331,9 @@
  */
 int ftruncate(int fildes, off_t length)
+{
+	return ftruncate64(fildes, length);
+}
+
+int ftruncate64(int fildes, off64_t length)
 {
 	if (failed(vfs_resize(fildes, (aoff64_t) length)))
