diff --git a/Common/FileUtil.cpp b/Common/FileUtil.cpp index a52941651d..479da535ae 100644 --- a/Common/FileUtil.cpp +++ b/Common/FileUtil.cpp @@ -354,7 +354,7 @@ bool Rename(const std::string &srcFilename, const std::string &destFilename) { INFO_LOG(COMMON, "Rename: %s --> %s", srcFilename.c_str(), destFilename.c_str()); -#ifdef UNICODE +#if defined(_WIN32) && defined(UNICODE) std::wstring srcw = ConvertUTF8ToWString(srcFilename); std::wstring destw = ConvertUTF8ToWString(destFilename); if (_wrename(srcw.c_str(), destw.c_str()) == 0)