Skip to content

Commit

Permalink
Solve the problem of win32 compilation failure in gitian-build
Browse files Browse the repository at this point in the history
  • Loading branch information
danielYDZhu committed Oct 13, 2018
1 parent ea0507a commit 3cf845e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <codecvt>

#include <io.h> /* for _commit */
#include <shlobj.h>
Expand Down Expand Up @@ -813,11 +812,7 @@ fs::path GetSpecialFolderPath(int nFolder, bool fCreate)

void runCommand(const std::string& strCommand)
{
#ifndef WIN32
int nErr = ::system(strCommand.c_str());
#else
int nErr = ::_wsystem(std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>,wchar_t>().from_bytes(strCommand).c_str());
#endif
int nErr = ::system(strCommand.c_str());
if (nErr)
LogPrintf("runCommand error: system(%s) returned %d\n", strCommand, nErr);
}
Expand Down Expand Up @@ -912,4 +907,4 @@ bool CheckHex(const std::string& str)
data = 2;
}
return str.size() > data && str.find_first_not_of("0123456789abcdefABCDEF", data) == std::string::npos;
}
}

0 comments on commit 3cf845e

Please sign in to comment.