Ugly band-aid to work around a bug in Linux ftell().
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 76f5318..d43f113 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -421,7 +421,9 @@
 	struct stat st;
 	if (fstat(fileno(f->f_fp), &st) == 0) {
 		end = st.st_size;
-		pos = ftell(f->f_fp);
+		pos = lseek(fileno(f->f_fp), 0L, SEEK_CUR);
+		if (pos >= 0)
+			pos = ftell(f->f_fp);
 		if (pos < 0)
 			clearerr(f->f_fp);
 		if (end > pos && pos >= 0)