diff options
author | 2012-01-05 19:02:27 -0800 | |
---|---|---|
committer | 2012-01-05 19:16:11 -0800 | |
commit | 28a7a416f55bcc6440766cd073b69e47f66fbc63 (patch) | |
tree | 4711279c7e024060224e91a9eed7f5f7ab52db6f /System/Posix/Temp | |
parent | 6d8b741f7ec6a72bdd6b76ca2a2509416be10b57 (diff) |
Fix validation error
Diffstat (limited to 'System/Posix/Temp')
-rw-r--r-- | System/Posix/Temp/ByteString.hsc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/System/Posix/Temp/ByteString.hsc b/System/Posix/Temp/ByteString.hsc index 7479614..a13e45a 100644 --- a/System/Posix/Temp/ByteString.hsc +++ b/System/Posix/Temp/ByteString.hsc @@ -22,10 +22,12 @@ module System.Posix.Temp.ByteString ( #include "HsUnix.h" -import System.IO ( Handle, openFile, IOMode(..) ) +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 @@ -69,7 +71,7 @@ mkdtemp template' = do let template = template' `B.append` (BC.pack "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 |