]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mount: fix hint initialization for getaddrinfo
authorYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 5 Nov 2009 18:00:19 +0000 (10:00 -0800)
committerSage Weil <sage@newdream.net>
Thu, 5 Nov 2009 17:58:10 +0000 (09:58 -0800)
src/mount/mount.ceph.c

index 208be17386407b7e08697aaaf8d3cb33b075036d..d8938ac4758e24d5113c352bbc7447161fe2bd89 100644 (file)
@@ -90,7 +90,9 @@ char *mount_resolve_dest(char *orig_str)
                /*printf("name '%s' port '%s'\n", tok, port_str);*/
 
                memset(&hint, 0, sizeof(hint));
-               hint.ai_protocol = AF_INET;
+               hint.ai_family = AF_INET;
+               hint.ai_socktype = SOCK_STREAM;
+               hint.ai_protocol = IPPROTO_TCP;
 
                r = getaddrinfo(tok, port_str, &hint, &res);
                if (r < 0) {