void-packages/srcpkgs/abduco/patches/0002-Fix-length-of-MSG_RESIZE-packet.patch
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword 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

26 lines
741 B
Diff

From c840155f209a67b16d2c8a0283542d636192576a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= <mat@brain-dump.org>
Date: Tue, 27 Jun 2017 08:49:22 +0200
Subject: [PATCH 2/4] Fix length of MSG_RESIZE packet
We no longer send the complete struct winsize.
---
client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git client.c client.c
index 2c2192b..f26bc8f 100644
--- a/client.c
+++ b/client.c
@@ -79,7 +79,7 @@ static int client_mainloop(void) {
Packet pkt = {
.type = MSG_RESIZE,
.u = { .ws = { .rows = ws.ws_row, .cols = ws.ws_col } },
- .len = sizeof(ws),
+ .len = sizeof(pkt.u.ws),
};
if (client_send_packet(&pkt))
client.need_resize = false;
--
2.24.0