$OpenBSD: patch-src_corelib_io_qfsfileengine_unix_cpp,v 1.13 2009/09/01 18:24:28 espie Exp $
--- src/corelib/io/qfsfileengine_unix.cpp.orig	Sat Jun 20 06:57:57 2009
+++ src/corelib/io/qfsfileengine_unix.cpp	Sun Aug 30 15:55:35 2009
@@ -297,7 +297,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;
