mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
tor: update sandbox patch for ppc32
[ci skip]
This commit is contained in:
parent
d10065e43f
commit
5f01f670c6
2 changed files with 35 additions and 14 deletions
35
srcpkgs/tor/patches/ppc.patch
Normal file
35
srcpkgs/tor/patches/ppc.patch
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
--- src/lib/sandbox/sandbox.c
|
||||||
|
+++ src/lib/sandbox/sandbox.c
|
||||||
|
@@ -115,6 +115,16 @@
|
||||||
|
#define REG_SYSCALL 8
|
||||||
|
#define M_SYSCALL regs[REG_SYSCALL]
|
||||||
|
|
||||||
|
+#elif defined(__powerpc64__)
|
||||||
|
+
|
||||||
|
+#define REG_SYSCALL 0
|
||||||
|
+#define M_SYSCALL gp_regs[REG_SYSCALL]
|
||||||
|
+
|
||||||
|
+#elif defined(__powerpc__)
|
||||||
|
+
|
||||||
|
+#define REG_SYSCALL 0
|
||||||
|
+#define M_SYSCALL gregs[REG_SYSCALL]
|
||||||
|
+
|
||||||
|
#endif /* defined(__i386__) || ... */
|
||||||
|
|
||||||
|
/**Determines if at least one sandbox is active.*/
|
||||||
|
@@ -1613,7 +1623,15 @@ sigsys_debugging(int nr, siginfo_t *info, void *void_context)
|
||||||
|
if (!ctx)
|
||||||
|
return;
|
||||||
|
|
||||||
|
+#if defined(__powerpc__) && !defined(__powerpc64__)
|
||||||
|
+#if defined(__GLIBC__)
|
||||||
|
+ syscall = (int) ctx->uc_mcontext.uc_regs->M_SYSCALL;
|
||||||
|
+#else
|
||||||
|
+ syscall = (int) ctx->uc_regs->M_SYSCALL;
|
||||||
|
+#endif
|
||||||
|
+#else
|
||||||
|
syscall = (int) ctx->uc_mcontext.M_SYSCALL;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#ifdef USE_BACKTRACE
|
||||||
|
depth = backtrace(syscall_cb_buf, MAX_DEPTH);
|
|
@ -1,14 +0,0 @@
|
||||||
--- src/lib/sandbox/sandbox.c 2018-12-20 17:33:15.815307612 +0100
|
|
||||||
+++ src/lib/sandbox/sandbox.c 2018-12-20 17:36:59.795797024 +0100
|
|
||||||
@@ -111,6 +111,11 @@
|
|
||||||
#define REG_SYSCALL 8
|
|
||||||
#define M_SYSCALL regs[REG_SYSCALL]
|
|
||||||
|
|
||||||
+#elif defined(__powerpc64__)
|
|
||||||
+
|
|
||||||
+#define REG_SYSCALL 0
|
|
||||||
+#define M_SYSCALL gp_regs[REG_SYSCALL]
|
|
||||||
+
|
|
||||||
#endif /* defined(__i386__) || ... */
|
|
||||||
|
|
||||||
/**Determines if at least one sandbox is active.*/
|
|
Loading…
Add table
Reference in a new issue