From 98495aa4133b6f23ba740af2f42a0801815d9432 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 25 Jul 2020 15:46:40 +0200 Subject: [PATCH] Make -DENABLE_TRACING work again --- src/MiniTrace.cpp | 9 +++++---- src/ccache.cpp | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/MiniTrace.cpp b/src/MiniTrace.cpp index b8d99f362..90caad306 100644 --- a/src/MiniTrace.cpp +++ b/src/MiniTrace.cpp @@ -16,15 +16,16 @@ // this program; if not, write to the Free Software Foundation, Inc., 51 // Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -#ifdef MTR_ENABLED +#include "system.hpp" -# include "MiniTrace.hpp" +#ifdef MTR_ENABLED # include "ArgsInfo.hpp" +# include "MiniTrace.hpp" +# include "Util.hpp" # include "legacy_util.hpp" namespace { - std::string get_system_tmp_dir() { @@ -70,7 +71,7 @@ MiniTrace::~MiniTrace() fmt::format("{}.ccache-trace", m_args_info.output_obj); move_file(m_tmp_trace_file.c_str(), trace_file.c_str()); } else { - tmp_unlink(m_tmp_trace_file.c_str()); + Util::unlink_tmp(m_tmp_trace_file.c_str()); } } diff --git a/src/ccache.cpp b/src/ccache.cpp index fa2c257b8..9c5d56ef8 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -1862,7 +1862,7 @@ initialize(Context& ctx, int argc, const char* const* argv) if (getenv("CCACHE_INTERNAL_TRACE")) { #ifdef MTR_ENABLED - ctx.mini_trace = std::make_unique(ctx->args_info); + ctx.mini_trace = std::make_unique(ctx.args_info); #else cc_log("Error: tracing is not enabled!"); #endif -- 2.47.3