diff --git a/Distribution/Compat/TempFile.hs b/Distribution/Compat/TempFile.hs
--- a/Distribution/Compat/TempFile.hs
+++ b/Distribution/Compat/TempFile.hs
@@ -27,7 +27,12 @@
 import Data.Bits              ((.|.))
 import System.Posix.Internals (c_open, c_close, o_CREAT, o_EXCL, o_RDWR,
                                o_BINARY, o_NONBLOCK, o_NOCTTY)
-import System.IO.Error        (try, isAlreadyExistsError)
+import System.IO.Error        (isAlreadyExistsError)
+#if __GLASGOW_HASKELL__ >= 706
+import Control.Exception      (try)
+#else
+import System.IO.Error        (try)
+#endif
 #if __GLASGOW_HASKELL__ >= 611
 import System.Posix.Internals (withFilePath)
 #else
diff --git a/temporary.cabal b/temporary.cabal
--- a/temporary.cabal
+++ b/temporary.cabal
@@ -1,5 +1,5 @@
 name:                temporary
-version:             1.1.2.3
+version:             1.1.2.4
 cabal-version:       >= 1.6
 synopsis:            Portable temporary file and directory support for Windows and Unix, based on code from Cabal
 description:         The functions for creating temporary files and directories in the base library are quite limited. The unixutils
@@ -22,7 +22,7 @@
     exposed-modules: System.IO.Temp
     other-modules:   Distribution.Compat.Exception
                      Distribution.Compat.TempFile
-    build-depends:   base >= 3 && < 6, filepath >= 1.1 && < 1.4, directory >= 1.0 && < 1.2
+    build-depends:   base >= 3 && < 6, filepath >= 1.1 && < 1.4, directory >= 1.0 && < 1.3
     
     if !os(windows)
-        build-depends: unix >= 2.3 && < 2.6
+        build-depends: unix >= 2.3 && < 2.7
