python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / 9mount / patches / no-ipv6-lookup.patch
blob7872b2c8bd21f8f2c808471ed8597089487dd43b
1 # HG changeset patch
2 # User Michael Gehring <mg@ebfe.org>
3 # Date 1397130207 -28800
4 # Thu Apr 10 19:43:27 2014 +0800
5 # Node ID c6da9cac8d01ae89f50abb9f1a3dbc87ffa1ad38
6 # Parent 97da3749d79840828c473fe6498c3e9bd4680ceb
7 Avoid ipv6 addresses since v9fs only supports ipv4.
9 diff -r 97da3749d798 -r c6da9cac8d01 9mount.c
10 --- 9mount.c Mon Nov 17 17:06:17 2008 +0900
11 +++ 9mount.c Thu Apr 10 19:43:27 2014 +0800
12 @@ -253,8 +253,12 @@
14 if (strcmp(proto, "tcp") == 0) {
15 struct addrinfo *ai;
16 + struct addrinfo aihints;
17 int r;
18 - if ((r=getaddrinfo(addr, NULL, NULL, &ai))) {
19 + memset(&aihints, 0, sizeof(aihints));
20 + aihints.ai_family = AF_INET;
21 + aihints.ai_socktype = SOCK_STREAM;
22 + if ((r=getaddrinfo(addr, NULL, &aihints, &ai))) {
23 errx(1, "getaddrinfo: %s", gai_strerror(r));
25 if ((r=getnameinfo(ai->ai_addr, ai->ai_addrlen, buf,