summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-09-20 16:29:18 +0000
committerIan Lynagh <igloo@earth.li>2008-09-20 16:29:18 +0000
commite5e6f6a16796cba5e2b6bd376481cf2cd0ba9734 (patch)
tree8386697a34b067bd8288ca14a99ef7730e445517
parente6ab8ea2645dfd0185639c9ee80edc6902bdb28c (diff)
downloadhaskell-e5e6f6a16796cba5e2b6bd376481cf2cd0ba9734.tar.gz
Fix building with GHC 6.6
-rw-r--r--utils/ghc-pkg/Main.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 49ac435cc2..344a21edb8 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -1243,7 +1243,13 @@ openNewFile dir template = do
-- XXX We want to tell fdToHandle what the filepath is,
-- as any exceptions etc will only be able to report the
-- fd currently
- h <- fdToHandle fd `onException` c_close fd
+ h <-
+#if __GLASGOW_HASKELL__ >= 609
+ fdToHandle fd
+#else
+ fdToHandle (fromIntegral fd)
+#endif
+ `onException` c_close fd
return (filepath, h)
where
filename = prefix ++ show x ++ suffix