void-packages/srcpkgs/pahole/patches/fix_limits.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

24 lines
498 B
Diff

diff --git dwarves.c dwarves.c
index 8cb359f..98b8b6b 100644
--- a/dwarves.c
+++ b/dwarves.c
@@ -22,6 +22,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/utsname.h>
+#include <limits.h>
#include "config.h"
#include "list.h"
diff --git pahole.c pahole.c
index dac7a49..15c0c29 100644
--- a/pahole.c
+++ b/pahole.c
@@ -10,6 +10,7 @@
#include <assert.h>
#include <stdio.h>
#include <dwarf.h>
+#include <limits.h>
#include <inttypes.h>
#include <search.h>
#include <stdarg.h>