From b758dcb39a8b07e10886c708e453c5e1062a9845 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 5 Nov 2009 10:00:19 -0800 Subject: [PATCH] mount: fix hint initialization for getaddrinfo --- src/mount/mount.ceph.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mount/mount.ceph.c b/src/mount/mount.ceph.c index 208be17386407..d8938ac4758e2 100644 --- a/src/mount/mount.ceph.c +++ b/src/mount/mount.ceph.c @@ -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) { -- 2.39.5