void-packages/srcpkgs/buffer/patches/musl-sem.patch
Đoàn Trần Công Danh c6ce65d3d0 srcpkgs/b*: 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

13 lines
489 B
Diff

The union semun is not defined in musl libc's sys/sem.h
--- a/sem.c 2014-11-26 23:41:09.000000000 +0100
+++ b/sem.c 2016-08-12 10:14:48.225963726 +0200
@@ -42,7 +42,7 @@
*
* mbuck@debian.org, 1999/08/29
*/
-#if defined(__GNU_LIBRARY__) && defined(_SEM_SEMUN_UNDEFINED)
+#if !defined(__GLIBC__) || (defined(__GNU_LIBRARY__) && defined(_SEM_SEMUN_UNDEFINED))
union semun {
int val; /* value for SETVAL */
struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */