void-packages/srcpkgs/abduco/patches/0003-Avoid-use-of-BUFSIZ-to-guarantee-system-independent-.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
622 B
Diff

From c3c115deab4562af72be43832aaecbd8accba51a 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:50:10 +0200
Subject: [PATCH 3/4] Avoid use of BUFSIZ to guarantee system independent
package size
---
abduco.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git abduco.c abduco.c
index 1bd6304..335907d 100644
--- a/abduco.c
+++ b/abduco.c
@@ -75,7 +75,7 @@ typedef struct {
uint32_t type;
uint32_t len;
union {
- char msg[BUFSIZ];
+ char msg[4096 - 2*sizeof(uint32_t)];
struct {
uint16_t rows;
uint16_t cols;
--
2.24.0