[tor-commits] [tor/maint-0.3.2] Make sandbox.c compile when libseccomp-dev is installed on arm64

nickm at torproject.org nickm at torproject.org
Wed Dec 13 00:46:58 UTC 2017


commit 15b41fa6ae6a1356d5453242ccb7d7d301dd5e67
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Dec 12 19:46:03 2017 -0500

    Make sandbox.c compile when libseccomp-dev is installed on arm64
    
    Fixes ticket 24424.  Patch from weasel.
---
 changes/bug24424     | 3 +++
 src/common/sandbox.c | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/changes/bug24424 b/changes/bug24424
new file mode 100644
index 000000000..63c2d39ba
--- /dev/null
+++ b/changes/bug24424
@@ -0,0 +1,3 @@
+  o Minor features (portability):
+    - Tor now compiles correctly on arm64 with libseccomp-dev installed.
+      (It doesn't yet work with the sandbox enabled.) Closes ticket 24424.
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index ba6c3efb9..8827370c2 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -106,6 +106,11 @@
 
 #define M_SYSCALL arm_r7
 
+#elif defined(__aarch64__) && defined(__LP64__)
+
+#define REG_SYSCALL 8
+#define M_SYSCALL regs[REG_SYSCALL]
+
 #endif /* defined(__i386__) || ... */
 
 /**Determines if at least one sandbox is active.*/



More information about the tor-commits mailing list