Skip to content

Commit

Permalink
fs: make zenfs compile with c++11 again
Browse files Browse the repository at this point in the history
Fix the broken c++11 builds by open-coding make_unique (c++14)
and include the <list> header.

Signed-off-by: Hans Holmberg <[email protected]>
  • Loading branch information
yhr committed Sep 7, 2022
1 parent 67abe24 commit c81038d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/zbd_zenfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ ZonedBlockDevice::ZonedBlockDevice(std::string path, ZbdBackendType backend,
std::shared_ptr<ZenFSMetrics> metrics)
: logger_(logger), metrics_(metrics) {
if (backend == ZbdBackendType::kBlockDev) {
zbd_be_ = std::make_unique<ZbdlibBackend>(path);
zbd_be_ = std::unique_ptr<ZbdlibBackend>(new ZbdlibBackend(path));
Info(logger_, "New Zoned Block Device: %s", zbd_be_->GetFilename().c_str());
} else if (backend == ZbdBackendType::kZoneFS) {
zbd_be_ = std::make_unique<ZoneFsBackend>(path);
zbd_be_ = std::unique_ptr<ZoneFsBackend>(new ZoneFsBackend(path));
Info(logger_, "New zonefs backing: %s", zbd_be_->GetFilename().c_str());
}
}
Expand Down
1 change: 1 addition & 0 deletions fs/zonefs_zenfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <string.h>
#include <unistd.h>

#include <list>
#include <map>
#include <string>

Expand Down

0 comments on commit c81038d

Please sign in to comment.