$OpenBSD: patch-src_corelib_io_qfsfileengine_unix_cpp,v 1.15 2010/06/21 16:40:52 espie Exp $
--- src/corelib/io/qfsfileengine_unix.cpp.orig	Wed Jun  2 04:03:17 2010
+++ src/corelib/io/qfsfileengine_unix.cpp	Mon Jun 21 11:32:32 2010
@@ -357,7 +357,7 @@ qint64 QFSFileEnginePrivate::nativeRead(char *data, qi
                     int readByte = 0;
                     do {
                         readByte = fgetc(fh);
-                    } while (readByte == -1 && errno == EINTR);
+                    } while (readByte == EOF && !feof(fh) && errno == EINTR);
                     if (readByte != -1) {
                         *data = uchar(readByte);
                         readBytes += 1;
