void-packages/srcpkgs/udptunnel/patches/02-strlen-prototype.diff
Đoàn Trần Công Danh 5769f150de srcpkgs/u*: 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

16 lines
573 B
Diff

# src: ubuntu
Description: Include string.h header for strlen prototype for GCC 4.4. compatibility.
Author: Chris Lamb <chris@chris-lamb.co.uk>
diff -urNad /tmp/bp-build/udptunnel-1.1.orig.orig/host2ip.c /tmp/bp-build/udptunnel-1.1.orig/host2ip.c
--- a/host2ip.c 2008-08-28 07:50:41.000000000 +0100
+++ b/host2ip.c 2008-08-28 07:50:49.000000000 +0100
@@ -6,6 +6,7 @@
#include <arpa/inet.h> /* inet_addr() */
#include <rpcsvc/ypclnt.h> /* YP */
#include <ctype.h> /* isspace() */
+#include <string.h> /* strlen() */
#include "host2ip.h"