void-packages/srcpkgs/9mount/patches/no-ipv6-lookup.patch
Đoàn Trần Công Danh 75403cef76 srcpkgs/[0-9]*: 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

25 lines
857 B
Diff

# HG changeset patch
# User Michael Gehring <mg@ebfe.org>
# Date 1397130207 -28800
# Thu Apr 10 19:43:27 2014 +0800
# Node ID c6da9cac8d01ae89f50abb9f1a3dbc87ffa1ad38
# Parent 97da3749d79840828c473fe6498c3e9bd4680ceb
Avoid ipv6 addresses since v9fs only supports ipv4.
diff -r 97da3749d798 -r c6da9cac8d01 9mount.c
--- a/9mount.c Mon Nov 17 17:06:17 2008 +0900
+++ b/9mount.c Thu Apr 10 19:43:27 2014 +0800
@@ -253,8 +253,12 @@
if (strcmp(proto, "tcp") == 0) {
struct addrinfo *ai;
+ struct addrinfo aihints;
int r;
- if ((r=getaddrinfo(addr, NULL, NULL, &ai))) {
+ memset(&aihints, 0, sizeof(aihints));
+ aihints.ai_family = AF_INET;
+ aihints.ai_socktype = SOCK_STREAM;
+ if ((r=getaddrinfo(addr, NULL, &aihints, &ai))) {
errx(1, "getaddrinfo: %s", gai_strerror(r));
}
if ((r=getnameinfo(ai->ai_addr, ai->ai_addrlen, buf,