void-packages/srcpkgs/mimic/patches/musl.patch
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: 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

11 lines
568 B
Diff

--- a/src/hts/hts_engine_API/lib/HTS_misc.c 2020-05-06 08:48:23.207180474 -0400
+++ b/src/hts/hts_engine_API/lib/HTS_misc.c 2020-05-06 08:49:38.850713440 -0400
@@ -247,6 +247,8 @@
fgetpos((FILE *) fp->pointer, &pos);
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__ANDROID__)
return (size_t) pos;
+#elif defined(__linux__) && !defined(__GLIBC__) /* musl */
+ return (size_t) pos.__lldata;
#else
return (size_t) pos.__pos;
#endif /* _WIN32 || __CYGWIN__ || __APPLE__ || __ANDROID__ */