aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/handler/exception_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/linux/handler/exception_handler.cc')
-rw-r--r--src/client/linux/handler/exception_handler.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index 57da0c56..592c9e5b 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -73,12 +73,18 @@
#include <stdio.h>
#include <sys/mman.h>
#include <sys/prctl.h>
+#if !defined(__ANDROID__)
#include <sys/signal.h>
+#endif
#include <sys/syscall.h>
+#if !defined(__ANDROID__)
#include <sys/ucontext.h>
#include <sys/user.h>
+#endif
#include <sys/wait.h>
+#if !defined(__ANDROID__)
#include <ucontext.h>
+#endif
#include <unistd.h>
#include <algorithm>
@@ -186,7 +192,7 @@ bool ExceptionHandler::InstallHandlers() {
stack.ss_sp = signal_stack;
stack.ss_size = kSigStackSize;
- if (sigaltstack(&stack, NULL) == -1)
+ if (sys_sigaltstack(&stack, NULL) == -1)
return false;
struct sigaction sa;
@@ -322,7 +328,7 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
return false;
// Allow ourselves to be dumped.
- prctl(PR_SET_DUMPABLE, 1);
+ sys_prctl(PR_SET_DUMPABLE, 1);
CrashContext context;
memcpy(&context.siginfo, info, sizeof(siginfo_t));
memcpy(&context.context, uc, sizeof(struct ucontext));