summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CPack/cmCPackTarCompressGenerator.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackTarCompressGenerator.cxx b/Source/CPack/cmCPackTarCompressGenerator.cxx
index 066b384..59527cd 100644
--- a/Source/CPack/cmCPackTarCompressGenerator.cxx
+++ b/Source/CPack/cmCPackTarCompressGenerator.cxx
@@ -26,7 +26,14 @@
#include "cmCPackLog.h"
#include <cmsys/SystemTools.hxx>
-#include <sys/stat.h>
+
+// Includes needed for implementation of RenameFile. This is not in
+// system tools because it is not implemented robustly enough to move
+// files across directories.
+#ifdef _WIN32
+# include <windows.h>
+# include <sys/stat.h>
+#endif
//----------------------------------------------------------------------
cmCPackTarCompressGenerator::cmCPackTarCompressGenerator()