mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
mingw: Document mode wbx workaround
This commit is contained in:
parent
fa359255fe
commit
fa895c7283
2 changed files with 8 additions and 3 deletions
|
@ -1164,7 +1164,13 @@ static auto InitBlocksdirXorKey(const BlockManager::Options& opts)
|
||||||
xor_key_file >> xor_key;
|
xor_key_file >> xor_key;
|
||||||
} else {
|
} else {
|
||||||
// Create initial or missing xor key file
|
// Create initial or missing xor key file
|
||||||
AutoFile xor_key_file{fsbridge::fopen(xor_key_path, "wbx")};
|
AutoFile xor_key_file{fsbridge::fopen(xor_key_path,
|
||||||
|
#ifdef __MINGW64__
|
||||||
|
"wb" // Temporary workaround for https://github.com/bitcoin/bitcoin/issues/30210
|
||||||
|
#else
|
||||||
|
"wbx"
|
||||||
|
#endif
|
||||||
|
)};
|
||||||
xor_key_file << xor_key;
|
xor_key_file << xor_key;
|
||||||
}
|
}
|
||||||
// If the user disabled the key, it must be zero.
|
// If the user disabled the key, it must be zero.
|
||||||
|
|
|
@ -30,8 +30,7 @@ BOOST_AUTO_TEST_CASE(xor_file)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
#ifdef __MINGW64__
|
#ifdef __MINGW64__
|
||||||
// Our usage of mingw-w64 and the msvcrt runtime does not support
|
// Temporary workaround for https://github.com/bitcoin/bitcoin/issues/30210
|
||||||
// the x modifier for the _wfopen().
|
|
||||||
const char* mode = "wb";
|
const char* mode = "wb";
|
||||||
#else
|
#else
|
||||||
const char* mode = "wbx";
|
const char* mode = "wbx";
|
||||||
|
|
Loading…
Add table
Reference in a new issue