2fd8d4df94
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
22 lines
472 B
Diff
22 lines
472 B
Diff
--- a/file.c
|
|
+++ b/file.c
|
|
@@ -19,6 +19,7 @@
|
|
#include <sys/types.h>
|
|
#include <sys/mman.h>
|
|
#include <sys/stat.h>
|
|
+#include <sys/sysmacros.h>
|
|
|
|
#include <err.h>
|
|
#include <errno.h>
|
|
--- a/seccomp-sandbox.c
|
|
+++ b/seccomp-sandbox.c
|
|
@@ -109,6 +109,9 @@ static const struct sock_filter filt_insns[] = {
|
|
#ifdef __NR_write
|
|
SC_ALLOW(__NR_write),
|
|
#endif
|
|
+#ifdef __NR_writev
|
|
+ SC_ALLOW(__NR_writev),
|
|
+#endif
|
|
|
|
/* Default deny. */
|
|
BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL),
|