void-packages/srcpkgs/kmscon/patches/define-SIGUNUSED-for-GLIBC.patch
Đoàn Trần Công Danh dd9d4a1979 srcpkgs/k*: 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

17 lines
430 B
Diff

--- a/src/pty.c
+++ b/src/pty.c
@@ -46,6 +46,14 @@
#define KMSCON_NREAD 16384
+/* ever since glibc 2.26 SIGUNUSED is no longer defined on any architerture
+ * http://man7.org/linux/man-pages/man7/signal.7.html
+ * according to signal(7) SIGUNUSED is synonymous with SIGSYS, musl defines it as such
+ */
+#ifdef __GLIBC__
+#define SIGUNUSED SIGSYS
+#endif
+
struct kmscon_pty {
unsigned long ref;
struct ev_eloop *eloop;