diff --git a/src/dwarfs/block_cache.cpp b/src/dwarfs/block_cache.cpp index f13cc55b..8be1e722 100644 --- a/src/dwarfs/block_cache.cpp +++ b/src/dwarfs/block_cache.cpp @@ -42,6 +42,7 @@ #include #include +#include #include #include "dwarfs/block_cache.h" @@ -232,11 +233,11 @@ class block_cache_ final : public block_cache::impl { , LOG_PROXY_INIT(lgr) , options_(options) { if (options.init_workers) { - wg_ = worker_group("blkcache", - std::max(options.num_workers > 0 - ? options.num_workers - : std::thread::hardware_concurrency(), - static_cast(1))); + wg_ = + worker_group("blkcache", std::max(options.num_workers > 0 + ? options.num_workers + : folly::hardware_concurrency(), + static_cast(1))); } } diff --git a/src/dwarfsck.cpp b/src/dwarfsck.cpp index 5e4c981a..5d330c5f 100644 --- a/src/dwarfsck.cpp +++ b/src/dwarfsck.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include "dwarfs/error.h" #include "dwarfs/filesystem_v2.h" @@ -42,7 +43,7 @@ namespace dwarfs { namespace po = boost::program_options; int dwarfsck(int argc, char** argv) { - const size_t num_cpu = std::max(std::thread::hardware_concurrency(), 1u); + const size_t num_cpu = std::max(folly::hardware_concurrency(), 1u); std::string log_level, input, export_metadata, image_offset; size_t num_workers; diff --git a/src/mkdwarfs.cpp b/src/mkdwarfs.cpp index 3d56c3e6..9734dcbe 100644 --- a/src/mkdwarfs.cpp +++ b/src/mkdwarfs.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include @@ -368,7 +369,7 @@ constexpr unsigned default_level = 7; int mkdwarfs(int argc, char** argv) { using namespace folly::gen; - const size_t num_cpu = std::max(std::thread::hardware_concurrency(), 1u); + const size_t num_cpu = std::max(folly::hardware_concurrency(), 1u); block_manager::config cfg; std::string path, output, memory_limit, script_arg, compression, header,