Fix the build on Windows
authorIan Lynagh <igloo@earth.li>
Mon, 5 Jan 2009 01:46:25 +0000 (01:46 +0000)
committerIan Lynagh <igloo@earth.li>
Mon, 5 Jan 2009 01:46:25 +0000 (01:46 +0000)
System/Posix/Internals.hs

index ebd9ec9..64e4f20 100644 (file)
@@ -35,6 +35,7 @@ import Foreign.C
 
 import Data.Bits
 import Data.Maybe
+import System.IO.Error
 
 #if __GLASGOW_HASKELL__
 import GHC.Base
@@ -270,7 +271,7 @@ setCooked fd cooked = do
 
 ioe_unk_error :: String -> String -> IOException
 ioe_unk_error loc msg 
- = IOError Nothing OtherError loc msg Nothing
+ = ioeSetErrorString (mkIOError OtherError loc Nothing Nothing) msg
 
 -- Note: echoing goes hand in hand with enabling 'line input' / raw-ness
 -- for Win32 consoles, hence setEcho ends up being the inverse of setCooked.