void-packages/srcpkgs/cln/patches/musl.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: convert patches to -Np1
```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

10 lines
396 B
Diff

--- a/src/timing/cl_t_current2.cc 2009-05-10 22:32:32.000000000 +0200
+++ b/src/timing/cl_t_current2.cc 2017-06-07 15:14:54.972741636 +0200
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <sys/param.h> // defines HZ, unit for times() is 1/HZ seconds
#include <sys/times.h>
+ #include <linux/param.h>
extern "C" clock_t times (struct tms * buffer);
#endif
#ifdef HAVE_PERROR_DECL