diff options
author | Adam Ruzicka <a.ruzicka@outlook.com> | 2017-01-14 14:07:17 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-02-08 07:58:06 +0000 |
commit | 04a56080849851d61b74aea68f42e96864c149fa (patch) | |
tree | bc135c5da541a9a2345a6cdefbc7dfb167698b0a /main/cjdns/musl-compat.patch | |
parent | 32de6d31c2975d3bafb90dfaeab91da13b0011e1 (diff) | |
download | aports-04a56080849851d61b74aea68f42e96864c149fa.tar.bz2 aports-04a56080849851d61b74aea68f42e96864c149fa.tar.xz |
main/cjdns: Add musl seccomp patch
Musl free() uses madvise syscall which is not allowed in the seccomp.
This makes cjdns crash whenever it tries to use it. This patch
is a workaround until it gets fixed on cjdns' side.
Originally proposed by cjd on #cjdns on EFnet.
Diffstat (limited to 'main/cjdns/musl-compat.patch')
-rw-r--r-- | main/cjdns/musl-compat.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/main/cjdns/musl-compat.patch b/main/cjdns/musl-compat.patch new file mode 100644 index 0000000000..e645f0ed2f --- /dev/null +++ b/main/cjdns/musl-compat.patch @@ -0,0 +1,17 @@ +diff --git a/util/Seccomp.c b/util/Seccomp.c +index e8a0ed7..7e724c4 100644 +--- a/util/Seccomp.c ++++ b/util/Seccomp.c +@@ -337,6 +337,12 @@ static struct sock_fprog* mkFilter(struct Allocator* alloc, struct Except* eh) + #ifdef __NR_getsockname + IFEQ(__NR_getsockname, success), + #endif ++ ++ // musl free() calls madvise() ++ #ifdef __NR_madvise ++ IFEQ(__NR_madvise, success), ++ #endif ++ + RET(SECCOMP_RET_TRAP), + + LABEL(socket), |