void-packages/srcpkgs/proot/patches/linux_wait_h.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```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
```
2021-06-20 13:17:29 +07:00

34 lines
1.2 KiB
Diff

--- a/src/ptrace/ptrace.c 2014-12-15 15:18:11.000000000 +0100
+++ b/src/ptrace/ptrace.c 2015-07-12 13:13:45.970093333 +0200
@@ -28,6 +28,7 @@
#include <sys/uio.h> /* struct iovec, */
#include <sys/param.h> /* MIN(), MAX(), */
#include <string.h> /* memcpy(3), */
+#include <linux/wait.h> /* __WALL, __WCLONE */
#include "ptrace/ptrace.h"
#include "ptrace/user.h"
--- a/src/ptrace/wait.c 2014-12-15 15:18:11.000000000 +0100
+++ b/src/ptrace/wait.c 2015-07-12 13:16:41.930106019 +0200
@@ -26,6 +26,7 @@
#include <stdbool.h> /* bool, true, false, */
#include <signal.h> /* SIG*, */
#include <talloc.h> /* talloc*, */
+#include <linux/wait.h> /* __WALL, __WCLONE */
#include "ptrace/wait.h"
#include "ptrace/ptrace.h"
--- a/src/tracee/tracee.c 2014-12-15 15:18:11.000000000 +0100
+++ b/src/tracee/tracee.c 2015-07-12 13:20:01.058120375 +0200
@@ -31,6 +31,11 @@
#include <signal.h> /* kill(2), SIGKILL, */
#include <sys/ptrace.h> /* ptrace(2), PTRACE_*, */
#include <errno.h> /* E*, */
+#include <linux/wait.h> /* __WALL, __WCLONE */
+
+#if !defined(__W_STOPCODE)
+#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
#include "tracee/tracee.h"
#include "tracee/reg.h"