You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
837 B
28 lines
837 B
9 years ago
|
diff -u -r ../PRoot-5.1.0/src/cli/cli.c ./src/cli/cli.c
|
||
|
--- ../PRoot-5.1.0/src/cli/cli.c 2014-12-15 09:18:11.000000000 -0500
|
||
|
+++ ./src/cli/cli.c 2016-01-08 15:16:33.393030857 -0500
|
||
9 years ago
|
@@ -30,7 +30,10 @@
|
||
9 years ago
|
#include <sys/types.h> /* getpid(2), */
|
||
|
#include <unistd.h> /* getpid(2), */
|
||
|
#include <errno.h> /* errno(3), */
|
||
9 years ago
|
+#include <libgen.h> /* basename(3), */
|
||
9 years ago
|
+#ifndef __ANDROID__
|
||
|
#include <execinfo.h> /* backtrace_symbols(3), */
|
||
|
+#endif
|
||
|
#include <limits.h> /* INT_MAX, */
|
||
|
|
||
|
#include "cli/cli.h"
|
||
|
@@ -558,7 +560,12 @@
|
||
|
void *const pointers[] = { this_function, call_site };
|
||
|
char **symbols = NULL;
|
||
|
|
||
|
+#ifdef __ANDROID__
|
||
|
+ fprintf(stderr, "backtrace_symbols() not available on Android\n");
|
||
|
+ exit(1);
|
||
|
+#else
|
||
|
symbols = backtrace_symbols(pointers, 2);
|
||
|
+#endif
|
||
|
if (symbols == NULL)
|
||
|
goto end;
|
||
|
|