diff options
Diffstat (limited to 'System/Posix/Temp.hsc')
-rw-r--r-- | System/Posix/Temp.hsc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/System/Posix/Temp.hsc b/System/Posix/Temp.hsc index bfbfee1..9989ca0 100644 --- a/System/Posix/Temp.hsc +++ b/System/Posix/Temp.hsc @@ -25,7 +25,9 @@ module System.Posix.Temp ( import System.IO import System.Posix.IO import System.Posix.Types +#if !defined(__GLASGOW_HASKELL__) && !defined(__HUGS__) import System.Posix.Directory (createDirectory) +#endif import Foreign.C #if __GLASGOW_HASKELL__ > 700 @@ -78,7 +80,7 @@ mkdtemp template' = do let template = template' ++ "XXXXXX" #if defined(__GLASGOW_HASKELL__) || defined(__HUGS__) withFilePath template $ \ ptr -> do - throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr) + _ <- throwErrnoIfNull "mkdtemp" (c_mkdtemp ptr) name <- peekFilePath ptr return name #else |