Skip to content

Commit fa895c7

Browse files
author
MarcoFalke
committed
mingw: Document mode wbx workaround
1 parent fa35925 commit fa895c7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/node/blockstorage.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,13 @@ static auto InitBlocksdirXorKey(const BlockManager::Options& opts)
11641164
xor_key_file >> xor_key;
11651165
} else {
11661166
// Create initial or missing xor key file
1167-
AutoFile xor_key_file{fsbridge::fopen(xor_key_path, "wbx")};
1167+
AutoFile xor_key_file{fsbridge::fopen(xor_key_path,
1168+
#ifdef __MINGW64__
1169+
"wb" // Temporary workaround for https://github.com/bitcoin/bitcoin/issues/30210
1170+
#else
1171+
"wbx"
1172+
#endif
1173+
)};
11681174
xor_key_file << xor_key;
11691175
}
11701176
// If the user disabled the key, it must be zero.

src/test/streams_tests.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ BOOST_AUTO_TEST_CASE(xor_file)
3030
}
3131
{
3232
#ifdef __MINGW64__
33-
// Our usage of mingw-w64 and the msvcrt runtime does not support
34-
// the x modifier for the _wfopen().
33+
// Temporary workaround for https://github.com/bitcoin/bitcoin/issues/30210
3534
const char* mode = "wb";
3635
#else
3736
const char* mode = "wbx";

0 commit comments

Comments
 (0)