diff --git a/ircd/mods.cc b/ircd/mods.cc index 2ba2e624c..d6a929252 100644 --- a/ircd/mods.cc +++ b/ircd/mods.cc @@ -714,12 +714,12 @@ try const unwind reset{[this, &theirs] { - assert(loading.top() == this); - loading.pop(); + assert(loading.front() == this); + loading.pop_front(); std::set_terminate(theirs); }}; - loading.push(this); + loading.emplace_front(this); std::set_terminate(ours); return boost::dll::shared_library{path, mode}; }()} @@ -766,7 +766,7 @@ try if(!loading.empty()) { - const auto &m(mod::loading.top()); + const auto &m(mod::loading.front()); m->children.emplace_back(this); log::debug { diff --git a/ircd/mods.h b/ircd/mods.h index 40cc937a9..71dbd762b 100644 --- a/ircd/mods.h +++ b/ircd/mods.h @@ -40,7 +40,7 @@ namespace ircd::mods struct ircd::mods::mod :std::enable_shared_from_this { - static std::stack loading; // State of current dlopen() recursion. + static std::forward_list loading; // State of current dlopen() recursion. static std::map> loaded; filesystem::path path;