diff --git a/src/System/PosixCompat/Files.hsc b/src/System/PosixCompat/Files.hsc
--- a/src/System/PosixCompat/Files.hsc
+++ b/src/System/PosixCompat/Files.hsc
@@ -392,7 +392,11 @@
 -- Renaming
 
 rename :: FilePath -> FilePath -> IO ()
+#if MIN_VERSION_Win32(2, 6, 0)
+rename name1 name2 = moveFileEx name1 (Just name2) mOVEFILE_REPLACE_EXISTING
+#else
 rename name1 name2 = moveFileEx name1 name2 mOVEFILE_REPLACE_EXISTING
+#endif
 
 -- -----------------------------------------------------------------------------
 -- chown()
diff --git a/unix-compat.cabal b/unix-compat.cabal
--- a/unix-compat.cabal
+++ b/unix-compat.cabal
@@ -1,5 +1,5 @@
 name:           unix-compat
-version:        0.5
+version:        0.5.0.1
 synopsis:       Portable POSIX-compatibility layer.
 description:    This package provides portable implementations of parts
                 of the unix package. This package re-exports the unix
