diff --git a/System/Posix/ByteString/FilePath.hsc b/System/Posix/ByteString/FilePath.hsc
index 55cd16a4dbeedaa6bd9338fe4d4b62f8a3a2d18e..f3ecd3c6d4da98c8fb1de6cfaadd8e1acbc28373 100644
--- a/System/Posix/ByteString/FilePath.hsc
+++ b/System/Posix/ByteString/FilePath.hsc
@@ -29,7 +29,7 @@ module System.Posix.ByteString.FilePath (
      throwErrnoPathIfMinus1_
   ) where
 
-import Foreign
+import Foreign hiding ( void )
 import Foreign.C hiding (
      throwErrnoPath,
      throwErrnoPathIf,
@@ -38,6 +38,7 @@ import Foreign.C hiding (
      throwErrnoPathIfMinus1,
      throwErrnoPathIfMinus1_ )
 
+import Control.Monad
 import Data.ByteString
 import Data.ByteString.Char8 as BC
 import Prelude hiding (FilePath)
diff --git a/System/Posix/Error.hs b/System/Posix/Error.hs
index 73988dc79650b4db37cdf5dea29257d5b8225520..7c68941e6f5a981c3b2e4c4b552493209b96e5c8 100644
--- a/System/Posix/Error.hs
+++ b/System/Posix/Error.hs
@@ -28,8 +28,9 @@ module System.Posix.Error (
         throwErrnoPathIfMinus1Retry_
   ) where
 
-import Foreign
+import Foreign hiding (void)
 import Foreign.C
+import Control.Monad
 
 throwErrnoPathIfMinus1Retry :: (Eq a, Num a)
                             => String -> FilePath -> IO a -> IO a