aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 7ccca2230..87a597253 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -268,9 +268,10 @@ int main(int argc, char** argv)
install_segv_handler();
use_temporary_dir();
-#ifdef __i386__
- // mmap syscall on i386 is translated to old_mmap and has different signature.
+#if defined(__i386__) || defined(__arm__)
+ // mmap syscall on i386/arm is translated to old_mmap and has different signature.
// As a workaround fix it up to mmap2, which has signature that we expect.
+ // pkg/csource has the same hack.
for (size_t i = 0; i < sizeof(syscalls) / sizeof(syscalls[0]); i++) {
if (syscalls[i].sys_nr == __NR_mmap)
syscalls[i].sys_nr = __NR_mmap2;