From 523c7698e24f32027605f7a82276508a40eb923a Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 22 Jun 2009 14:07:24 +0000 Subject: [PATCH] follow change in System.Posix.Internals.c_open --- utils/ghc-pkg/Main.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index 19052a5..d5baf9f 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 -- 1.7.10.4