void-packages/srcpkgs/drbd-utils/patches/ftbfs.patch
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid 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

30 lines
764 B
Diff

--- a/user/v83/drbdadm.h
+++ b/user/v83/drbdadm.h
@@ -4,6 +4,7 @@
#include <linux/drbd_config.h>
#include <sys/utsname.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <net/if.h>
#include <stdint.h>
#include <stdarg.h>
--- a/user/v84/drbdadm.h
+++ b/user/v84/drbdadm.h
@@ -4,6 +4,7 @@
#include <stdbool.h>
#include <sys/utsname.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <net/if.h>
#include <stdint.h>
#include <stdarg.h>
--- a/user/v9/drbdadm.h
+++ b/user/v9/drbdadm.h
@@ -4,6 +4,7 @@
#include <stdbool.h>
#include <sys/utsname.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <net/if.h>
/* We carry a copy of <sys/queue.h> around,
* some older versions of it don't have the STAILQ_* variants */