mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Allow compilation on android (#7386)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
namespace wpi {
|
||||
|
||||
std::string GetStackTraceDefault(int offset) {
|
||||
#ifndef __ANDROID__
|
||||
void* stackTrace[128];
|
||||
int stackSize = backtrace(stackTrace, 128);
|
||||
char** mangledSymbols = backtrace_symbols(stackTrace, stackSize);
|
||||
@@ -38,6 +39,10 @@ std::string GetStackTraceDefault(int offset) {
|
||||
std::free(mangledSymbols);
|
||||
|
||||
return std::string{trace.str()};
|
||||
#else
|
||||
// backtrace_symbols not supported on android
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace wpi
|
||||
|
||||
Reference in New Issue
Block a user