void-packages/srcpkgs/dracut/patches/musl-__wordsize.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

15 lines
426 B
Diff

For musl libc it is required to include <sys/reg.h> to
have __WORDSIZE defined to e.g. 32 for arm*-musl.
--- a/install/util.h 2015-06-15 12:27:21.000000000 +0200
+++ b/install/util.h 2015-09-02 09:07:57.321104222 +0200
@@ -33,6 +33,9 @@
#include <signal.h>
#include <sched.h>
#include <limits.h>
+#if !defined(__GLIBC__)
+#include <sys/reg.h>
+#endif
#include <sys/stat.h>
#include <dirent.h>
#include <sys/resource.h>