Index: libs/libmyth/util.cpp
===================================================================
--- libs/libmyth/util.cpp	(revision 25902)
+++ libs/libmyth/util.cpp	(working copy)
@@ -945,6 +945,34 @@
                 ok = false;
             }
         }
+
+#if CONFIG_DARWIN
+        if (src.isSequential())
+        {
+            qint64 bytesAvail;
+            do
+            {
+                myth_yield();
+
+                bytesAvail = src.size();
+                if (bytesAvail > 0 && bytesAvail < buflen)
+                {
+                    // Adding this sleep call when a small number of bytes
+                    // is available seems to correct the problem with the hang
+                    // in QFSFileEnginePrivate::nativeRead on MacOS.
+                    //
+                    // With the sleep, src.atEnd() correctly returns true
+                    // after the last read.  Otherwise, it returns false forever.
+                    sleep(1);
+                }
+            } while (bytesAvail == 0 && !src.atEnd());
+
+            if (src.atEnd())
+            {
+                break;
+            }
+        }
+#endif
     }
     delete[] buf;
 
