summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-06-22 14:07:24 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-06-22 14:07:24 +0000
commit523c7698e24f32027605f7a82276508a40eb923a (patch)
tree702270464e7f8d604e96cb14102758137cd2fe9f /utils
parent6cb71745628c4d9b91b7ec26ef6122167eb3eb40 (diff)
downloadhaskell-523c7698e24f32027605f7a82276508a40eb923a.tar.gz
follow change in System.Posix.Internals.c_open
Diffstat (limited to 'utils')
-rw-r--r--utils/ghc-pkg/Main.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 19052a5e2c..d5baf9f610 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -1342,8 +1342,12 @@ openNewFile dir template = do
oflags = rw_flags .|. o_EXCL
+#if __GLASGOW_HASKELL__ < 611
+ withFilePath = withCString
+#endif
+
findTempName x = do
- fd <- withCString filepath $ \ f ->
+ fd <- withFilePath filepath $ \ f ->
c_open f oflags 0o666
if fd < 0
then do