25 lines
853 B
Diff
25 lines
853 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
|
|
--- 9mount.c Mon Nov 17 17:06:17 2008 +0900
|
|
+++ 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,
|