mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-03 23:41:21 -07:00
common: fix build without libunwind
This commit is contained in:
parent
f72388c1c6
commit
15c2b69db7
@ -28,8 +28,10 @@
|
|||||||
|
|
||||||
#include "common/stack_trace.h"
|
#include "common/stack_trace.h"
|
||||||
#include "misc_log_ex.h"
|
#include "misc_log_ex.h"
|
||||||
|
#ifdef HAVE_LIBUNWIND
|
||||||
#define UNW_LOCAL_ONLY
|
#define UNW_LOCAL_ONLY
|
||||||
#include <libunwind.h>
|
#include <libunwind.h>
|
||||||
|
#endif
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
@ -112,8 +114,6 @@ void log_stack_trace(const char *msg)
|
|||||||
LOG_PRINT2(log, " " << std::setw(4) << level << std::setbase(16) << std::setw(20) << "0x" << ip << " " << (!status && dsym ? dsym : sym) << " + " << "0x" << off, LOG_LEVEL_0);
|
LOG_PRINT2(log, " " << std::setw(4) << level << std::setbase(16) << std::setw(20) << "0x" << ip << " " << (!status && dsym ? dsym : sym) << " + " << "0x" << off, LOG_LEVEL_0);
|
||||||
free(dsym);
|
free(dsym);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#warning libunwind disabled, no stack traces
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user