diff -up kaya-0.5.2/compiler/KeyGen.hs.ghc612 kaya-0.5.2/compiler/KeyGen.hs --- kaya-0.5.2/compiler/KeyGen.hs.ghc612 2010-03-06 19:02:03.454027976 +0100 +++ kaya-0.5.2/compiler/KeyGen.hs 2010-03-06 19:02:30.837028764 +0100 @@ -11,7 +11,7 @@ getRandom :: Int -> IO [Int] getRandom n = do devrnd <- doesFileExist "/dev/urandom" if devrnd then do - h <- openFile "/dev/urandom" ReadMode + h <- openBinaryFile "/dev/urandom" ReadMode ns <- readInts n h hClose h return ns