void-packages/srcpkgs/pilot-link/patches/fix-ai_non_const.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: 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

22 lines
908 B
Diff

--- a/libpisock/address.c 2016-12-20 13:56:43.913681767 +0100
+++ b/libpisock/address.c 2016-12-20 13:57:47.512723493 +0100
@@ -260,7 +260,7 @@
*
***********************************************************************/
int
-pack_AddressAppInfo(const AddressAppInfo_t *ai, unsigned char *record, size_t len)
+pack_AddressAppInfo(AddressAppInfo_t *ai, unsigned char *record, size_t len)
{
int i;
size_t destlen = 4 + 16 * 22 + 2 + 2;
--- a/include/pi-address.h 2007-01-15 01:29:59.000000000 +0100
+++ b/include/pi-address.h 2016-12-20 14:05:35.094015860 +0100
@@ -82,7 +82,7 @@
extern int unpack_AddressAppInfo
PI_ARGS((AddressAppInfo_t *, const unsigned char *AppInfo, size_t len));
extern int pack_AddressAppInfo
- PI_ARGS((const AddressAppInfo_t *, unsigned char *AppInfo, size_t len));
+ PI_ARGS((AddressAppInfo_t *, unsigned char *AppInfo, size_t len));
#ifdef __cplusplus
};