Skip to content

Commit d8c5b6c

Browse files
depends: boost 1_86_0 (#40)
* depends: pin boost to 1.86.0 Take a modern boost as the pinned version to improve c++17 and later compatibility with modern compilers that removed backward compatibility * fs: fix boost filesystem v3 compatibility Implements breaking changes in boost::filesystem (which were done for compatibility with std::filesystem): - recursive_directory_iterator::level() -> depth() - recursive_directory_iterator::no_push() -> disable_recursion_pending() - copy_option::overwrite_if_exists -> copy_options::overwrite_existing See: https://www.boost.org/doc/libs/1_86_0/libs/filesystem/doc/deprecated.html
1 parent d22afe9 commit d8c5b6c

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

depends/packages/boost.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package=boost
2-
$(package)_version=1_71_0
3-
$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/
2+
$(package)_version=1_86_0
3+
$(package)_download_path=https://archives.boost.io/release/$(subst _,.,$($(package)_version))/source/
44
$(package)_file_name=boost_$($(package)_version).tar.bz2
5-
$(package)_sha256_hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
5+
$(package)_sha256_hash=1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b
66
$(package)_dependencies=native_b2
77

88
define $(package)_set_vars

src/wallet/bdb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ bool BerkeleyDatabase::Backup(const std::string& strDest) const
624624
return false;
625625
}
626626

627-
fs::copy_file(pathSrc, pathDest, fs::copy_option::overwrite_if_exists);
627+
fs::copy_file(pathSrc, pathDest, fs::copy_options::overwrite_existing);
628628
LogPrintf("copied %s to %s\n", strFile, pathDest.string());
629629
return true;
630630
} catch (const fs::filesystem_error& e) {

src/wallet/db.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ std::vector<fs::path> ListDatabases(const fs::path& wallet_dir)
1919
for (auto it = fs::recursive_directory_iterator(wallet_dir, ec); it != fs::recursive_directory_iterator(); it.increment(ec)) {
2020
if (ec) {
2121
if (fs::is_directory(*it)) {
22-
it.no_push();
22+
it.disable_recursion_pending();
2323
LogPrintf("%s: %s %s -- skipping.\n", __func__, ec.message(), it->path().string());
2424
} else {
2525
LogPrintf("%s: %s %s\n", __func__, ec.message(), it->path().string());
@@ -36,7 +36,7 @@ std::vector<fs::path> ListDatabases(const fs::path& wallet_dir)
3636
(IsBDBFile(BDBDataFile(it->path())) || IsSQLiteFile(SQLiteDataFile(it->path())))) {
3737
// Found a directory which contains wallet.dat btree file, add it as a wallet.
3838
paths.emplace_back(path);
39-
} else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && IsBDBFile(it->path())) {
39+
} else if (it.depth() == 0 && it->symlink_status().type() == fs::regular_file && IsBDBFile(it->path())) {
4040
if (it->path().filename() == "wallet.dat") {
4141
// Found top-level wallet.dat btree file, add top level directory ""
4242
// as a wallet.
@@ -51,7 +51,7 @@ std::vector<fs::path> ListDatabases(const fs::path& wallet_dir)
5151
}
5252
} catch (const std::exception& e) {
5353
LogPrintf("%s: Error scanning %s: %s\n", __func__, it->path().string(), e.what());
54-
it.no_push();
54+
it.disable_recursion_pending();
5555
}
5656
}
5757

0 commit comments

Comments
 (0)