diff --git a/ghc/runtime/hooks/IOErrorHdr.lc b/ghc/runtime/hooks/IOErrorHdr.lc
new file mode 100644
index 0000000000000000000000000000000000000000..73676f5bb57769987315a26105b9508658df81f3
--- /dev/null
+++ b/ghc/runtime/hooks/IOErrorHdr.lc
@@ -0,0 +1,11 @@
+\begin{code}
+#include "rtsdefs.h"
+
+void
+IOErrorHdrHook (FILE *where)
+{
+    fflush( stdout );			/* Flush out any pending output */
+
+    fprintf(where, "\nI/O error: ");
+}
+\end{code}