Skip to content

Commit

Permalink
Merge bitcoin#22808: [0.21] 0.21.2rc2 backports
Browse files Browse the repository at this point in the history
d9b18c1 Fix build with Boost 1.77.0 (Rafael Sadowski)
2d7f260 ci: Run fuzzer task for the master branch only (Hennadii Stepanov)

Pull request description:

  Backported:

  1) bitcoin#22730
  1) bitcoin#22713

ACKs for top commit:
  fanquake:
    ACK d9b18c1 - Checked the backports and tested building this branch with system Boost 1.76.0 and depends Boost 1.77.0.

Tree-SHA512: dc3e0a2b3c1e3e80f6570e329a08ebc5103c233c30562f660432891c90bacb4d88d5373e32b9ac34fd143be46b8e63900ce9f52786b04bc799a4d17ba9fd8499
  • Loading branch information
fanquake committed Aug 28, 2021
2 parents 55a8a5b + d9b18c1 commit 6ebb9d0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ task:

task:
name: 'x86_64 Linux [GOAL: install] [focal] [no depends, only system libs, sanitizers: fuzzer,address,undefined]'
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BASE_BRANCH == $CIRRUS_DEFAULT_BRANCH
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
Expand Down
4 changes: 4 additions & 0 deletions src/fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ void ofstream::close()
}
#else // __GLIBCXX__

#if BOOST_VERSION >= 107700
static_assert(sizeof(*BOOST_FILESYSTEM_C_STR(fs::path())) == sizeof(wchar_t),
#else
static_assert(sizeof(*fs::path().BOOST_FILESYSTEM_C_STR) == sizeof(wchar_t),
#endif // BOOST_VERSION >= 107700
"Warning: This build is using boost::filesystem ofstream and ifstream "
"implementations which will fail to open paths containing multibyte "
"characters. You should delete this static_assert to ignore this warning, "
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/test/db_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ BOOST_AUTO_TEST_CASE(getwalletenv_file)
std::string test_name = "test_name.dat";
const fs::path datadir = GetDataDir();
fs::path file_path = datadir / test_name;
#if BOOST_VERSION >= 107700
std::ofstream f(BOOST_FILESYSTEM_C_STR(file_path));
#else
std::ofstream f(file_path.BOOST_FILESYSTEM_C_STR);
#endif // BOOST_VERSION >= 107700
f.close();

std::string filename;
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/test/init_test_fixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ InitWalletDirTestingSetup::InitWalletDirTestingSetup(const std::string& chainNam
fs::create_directories(m_walletdir_path_cases["default"]);
fs::create_directories(m_walletdir_path_cases["custom"]);
fs::create_directories(m_walletdir_path_cases["relative"]);
#if BOOST_VERSION >= 107700
std::ofstream f(BOOST_FILESYSTEM_C_STR(m_walletdir_path_cases["file"]));
#else
std::ofstream f(m_walletdir_path_cases["file"].BOOST_FILESYSTEM_C_STR);
#endif // BOOST_VERSION >= 107700
f.close();
}

Expand Down

0 comments on commit 6ebb9d0

Please sign in to comment.