$OpenBSD: patch-src_corelib_io_qfsfileengine_unix_cpp,v 1.10 2008/10/21 22:20:00 espie Exp $
--- src/corelib/io/qfsfileengine_unix.cpp.orig	Sat Sep 27 10:58:47 2008
+++ src/corelib/io/qfsfileengine_unix.cpp	Mon Oct 20 14:57:36 2008
@@ -275,7 +275,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;
