diff --git a/deps/ox/src/ox/std/stacktrace.cpp b/deps/ox/src/ox/std/stacktrace.cpp index f4fa7714..6de4af2f 100644 --- a/deps/ox/src/ox/std/stacktrace.cpp +++ b/deps/ox/src/ox/std/stacktrace.cpp @@ -33,7 +33,7 @@ static Vector symbolicate([[maybe_unused]]const char **frames, [[maybe_u Dl_info info; if (dladdr(frames[i], &info) && info.dli_sname) { int status = -1; - const auto name = abi::__cxa_demangle(info.dli_sname, nullptr, 0, &status); + const auto name = abi::__cxa_demangle(info.dli_sname, nullptr, nullptr, &status); if (status == 0) { out.emplace_back(sfmt("{}: {}", i, name)); continue; @@ -51,9 +51,9 @@ static Vector symbolicate([[maybe_unused]]const char **frames, [[maybe_u void printStackTrace([[maybe_unused]]unsigned shave) noexcept { #if defined(OX_USE_STDLIB) && __has_include() Vector frames(1000); - frames.resize(static_cast(backtrace(frames.data(), frames.size()))); + frames.resize(static_cast(backtrace(frames.data(), static_cast(frames.size())))); if (frames.size() - shave > 2) { - const auto symbols = backtrace_symbols(frames.data() + shave, frames.size() - shave); + const auto symbols = backtrace_symbols(frames.data() + shave, static_cast(frames.size() - shave)); const auto symbolicatedStacktrace = symbolicate(bit_cast(frames.data() + shave), frames.size() - shave, "\t"); free(symbols); oxErr("Stacktrace:\n");