void-packages/srcpkgs/qingy/patches/fix-musl.patch
Đoàn Trần Công Danh 635e9da391 srcpkgs/q*: convert patches to -Np1
* par 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

35 lines
1,000 B
Diff

--- a/src/libraries/misc.h 2016-03-31 23:28:06.023869695 +0200
+++ b/src/libraries/misc.h 2016-03-31 23:28:12.069869242 +0200
@@ -30,6 +30,7 @@
#endif
#include "qingy_constants.h"
+#include <time.h>
/* Computes the integer part of the base 10 log */
int int_log10(int n);
--- a/src/libraries/vt.c 2016-03-31 23:33:35.641845025 +0200
+++ b/src/libraries/vt.c 2016-03-31 23:33:49.739843970 +0200
@@ -101,9 +101,9 @@ int switch_to_tty(int tty)
if (!ttyname) return 0;
/* we set stdin, stdout and stderr to the new tty */
- stdin = freopen(ttyname, "r", stdin);
- stdout = freopen(ttyname, "w", stdout);
- stderr = freopen(ttyname, "w", stderr);
+ freopen(ttyname, "r", stdin);
+ freopen(ttyname, "w", stdout);
+ freopen(ttyname, "w", stderr);
free(ttyname);
if (!stdin || !stdout || !stderr) return 0;
@@ -205,7 +205,7 @@ void stderr_enable(int *vt)
if (!ttyname) return;
- stderr = fopen(ttyname, "w");
+ freopen(ttyname, "w", stderr);
free(ttyname);
}