void-packages/srcpkgs/flightgear/patches/musl-fix_error_h.patch
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc 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

14 lines
515 B
Diff

There is no <error.h> in musl libc, thus enable the
include only if __GLIB__ is defined.
--- a/3rdparty/iaxclient/lib/libiax2/src/iax.c 2015-02-18 21:10:05.000000000 +0100
+++ b/3rdparty/iaxclient/lib/libiax2/src/iax.c 2015-10-31 17:14:55.477461723 +0100
@@ -75,7 +75,7 @@
// FlightGear: Modified to include FreeBSD
#if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
#include <malloc.h>
-#if !defined(SOLARIS)
+#if !defined(SOLARIS) && defined(__GLIBC__)
#include <error.h>
#endif
#endif