summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-06 17:07:02 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-06 17:07:02 +0300
commitbbfe142ec3b7879bbd618f36367f95c030d65968 (patch)
tree0e8a23da34bb5cca0d3bfd4f610c9765b0651c5a /src/utils
parent15c9b3a3486334a8c54e3f4e29b952967d03d420 (diff)
downloadplus-bbfe142ec3b7879bbd618f36367f95c030d65968.tar.gz
plus-bbfe142ec3b7879bbd618f36367f95c030d65968.tar.bz2
plus-bbfe142ec3b7879bbd618f36367f95c030d65968.tar.xz
plus-bbfe142ec3b7879bbd618f36367f95c030d65968.zip
Fix compilation under Android.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/checkutils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/checkutils.cpp b/src/utils/checkutils.cpp
index bbc23ef12..275c4e447 100644
--- a/src/utils/checkutils.cpp
+++ b/src/utils/checkutils.cpp
@@ -24,9 +24,11 @@
#include "logger.h"
+#ifndef ANDROID
#if defined __linux__ || defined __linux
#include <execinfo.h>
#endif // defined __linux__ || defined __linux
+#endif // ANDROID
#include "debug.h"
@@ -36,12 +38,14 @@ void reportStack(const char *const file,
const char *const name,
const char *const text)
{
+#ifndef ANDROID
#if defined __linux__ || defined __linux
void *array[15];
int size;
char **strings;
int i;
#endif // defined __linux__ || defined __linux
+#endif // ANDROID
logger->log("--- Assert: %s --------------------------------------------",
name);
@@ -50,6 +54,7 @@ void reportStack(const char *const file,
line,
text,
func);
+#ifndef ANDROID
#if defined __linux__ || defined __linux
size = static_cast<int>(backtrace(array, 15));
strings = backtrace_symbols(array, size);
@@ -57,6 +62,7 @@ void reportStack(const char *const file,
logger->log1(strings[i]);
free(strings);
#endif // defined __linux__ || defined __linux
+#endif // ANDROID
}
#endif // ENABLE_ASSERTS