diff --git a/include/ircd/fs/fd.h b/include/ircd/fs/fd.h index 7d591430e..c561e1e32 100644 --- a/include/ircd/fs/fd.h +++ b/include/ircd/fs/fd.h @@ -66,6 +66,6 @@ struct ircd::fs::fd::opts bool nocreate {false}; /// Construct options from an std::ios::open_mode bitmask. - opts(const std::ios::open_mode &); + opts(const std::ios::openmode &); opts() = default; }; diff --git a/ircd/db.cc b/ircd/db.cc index 172a82e4d..70942e3be 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -3461,8 +3461,8 @@ try { fs::fd::opts ret { - std::ios_base::out | - (trunc? std::ios::trunc : 0) + std::ios::out | + (trunc? std::ios::trunc : std::ios::openmode(0)) }; ret.direct = this->env_opts.use_direct_writes; diff --git a/ircd/fs.cc b/ircd/fs.cc index 7525eaa3e..d23dc18ec 100644 --- a/ircd/fs.cc +++ b/ircd/fs.cc @@ -553,7 +553,7 @@ namespace ircd::fs { thread_local char path_buf[PATH_MAX]; static const char *path_str(const string_view &); - static uint posix_flags(const std::ios::open_mode &mode); + static uint posix_flags(const std::ios::openmode &mode); } #ifdef HAVE_SYS_STAT_H @@ -612,7 +612,7 @@ ircd::fs::size(const fd &fd) } uint -ircd::fs::posix_flags(const std::ios::open_mode &mode) +ircd::fs::posix_flags(const std::ios::openmode &mode) { static const auto rdwr { @@ -644,7 +644,7 @@ ircd::fs::path_str(const string_view &s) // fd::opts // -ircd::fs::fd::opts::opts(const std::ios::open_mode &mode) +ircd::fs::fd::opts::opts(const std::ios::openmode &mode) :flags { posix_flags(mode)