diff -u -r -N -p DirectFB-1.2.0.orig/lib/direct/stream.c DirectFB-1.2.0/lib/direct/stream.c
--- DirectFB-1.2.0.orig/lib/direct/stream.c	2008-06-02 07:07:44.000000000 +0100
+++ DirectFB-1.2.0/lib/direct/stream.c	2008-10-06 16:04:18.216154847 +0100
@@ -1958,7 +1958,7 @@ static DirectResult
 file_open( DirectStream *stream, const char *filename, int fileno )
 {
      if (filename)
-          stream->fd = open( filename, O_RDONLY | O_NONBLOCK );
+          stream->fd = open( filename, O_RDONLY | O_NONBLOCK | O_LARGEFILE );
      else
           stream->fd = dup( fileno );
      
@@ -1978,9 +1978,19 @@ file_open( DirectStream *stream, const c
           struct stat s;
 
           if (fstat( stream->fd, &s ) < 0)
-               return errno2result( errno );
-      
-          stream->length = s.st_size;
+		  {
+			  if (errno != EOVERFLOW)
+				  return errno2result( errno );
+
+			  // If it's a 64-bit file then everything _should_ still
+			  // work because we only do relative seeks internally and
+			  // other people will probably just seek back to the
+			  // beginning of the file which also works.
+			  stream->length = -1;
+		  }
+		  else      
+			  stream->length = s.st_size;
+		  
           stream->peek   = file_peek;
           stream->read   = file_read;
           stream->seek   = file_seek;
