mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-28 02:04:15 +01:00
Fix double declaration of tgkill when using Android NDK Headers.
As of Android API level 16 tgkill is declared in the NDK version of signal.h, which conflicts with the static definition found in src/client/linux/handler/exception_handler.cc. This change removes the static tgkill definition and replaces its use with sys_tgkill from the linux syscall support library. Bug: Change-Id: Ic70addd8a064cfa36345d86b7e36409e2089e909 Reviewed-on: https://chromium-review.googlesource.com/738912 Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
fd0a0d2b7a
commit
7e3c165000
@ -105,12 +105,6 @@
|
||||
#define PR_SET_PTRACER 0x59616d61
|
||||
#endif
|
||||
|
||||
// A wrapper for the tgkill syscall: send a signal to a specific thread.
|
||||
static int tgkill(pid_t tgid, pid_t tid, int sig) {
|
||||
return syscall(__NR_tgkill, tgid, tid, sig);
|
||||
return 0;
|
||||
}
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
namespace {
|
||||
@ -400,7 +394,7 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) {
|
||||
// In order to retrigger it, we have to queue a new signal by calling
|
||||
// kill() ourselves. The special case (si_pid == 0 && sig == SIGABRT) is
|
||||
// due to the kernel sending a SIGABRT from a user request via SysRQ.
|
||||
if (tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
|
||||
if (sys_tgkill(getpid(), syscall(__NR_gettid), sig) < 0) {
|
||||
// If we failed to kill ourselves (e.g. because a sandbox disallows us
|
||||
// to do so), we instead resort to terminating our process. This will
|
||||
// result in an incorrect exit code.
|
||||
|
Loading…
Reference in New Issue
Block a user