Link backtrace.cpp on Android too for consistency. Use it in FLOG.

This commit is contained in:
Henrik Rydgård committed 2014-01-23 14:31:56 +01:00
1 parent 52fac5d294
commit 25bbd8fbd1
4 files changed
+25 -6

No files matched your search

+10 -3
View File
@@ -1,8 +1,7 @@
#include "base/backtrace.h"
#ifdef __linux__
// LINUX ONLY
// The mac check doesn't seem to work right.
#if (!defined(ANDROID) && defined(__linux__)) || (defined(__APPLE__) && (defined(_M_IX86) || defined(_M_X64)))
#include <execinfo.h>
#include <unistd.h>
@@ -14,4 +13,12 @@ void PrintBacktraceToStderr() {
backtrace_symbols_fd(backtrace_buffer, num_addrs, STDERR_FILENO);
}
#else
#include <stdio.h>
void PrintBacktraceToStderr() {
fprintf(stderr, "No backtrace available to print on this platform\n");
}
#endif