summaryrefslogtreecommitdiffstats
path: root/ctdb/common
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-11-25 17:01:58 +0100
committerMichael Adam <obnox@samba.org>2011-11-26 00:34:54 +0100
commit5d94dff27e96e09e1f81d4811ce1e2492edff13f (patch)
treee7664aead4e4e5c8f04f195aa9dd78778f31b0bc /ctdb/common
parentd9516a8bf96066705bbb4b9cf1f31aac6e75a961 (diff)
downloadsamba-5d94dff27e96e09e1f81d4811ce1e2492edff13f.tar.gz
samba-5d94dff27e96e09e1f81d4811ce1e2492edff13f.tar.xz
samba-5d94dff27e96e09e1f81d4811ce1e2492edff13f.zip
system_linux: correctly cast sockaddr_in6 to sockaddr for sendto() in ctdb_sys_send_tcp()
(This used to be ctdb commit 11bebd5367102fcd02b17c44ac87bf50d4c68785)
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/system_linux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ctdb/common/system_linux.c b/ctdb/common/system_linux.c
index b063abb8e04..ca2d47580ba 100644
--- a/ctdb/common/system_linux.c
+++ b/ctdb/common/system_linux.c
@@ -397,7 +397,9 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
tmpport = tmpdest->ip6.sin6_port;
tmpdest->ip6.sin6_port = 0;
- ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0, &dest->ip6, sizeof(dest->ip6));
+ ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0,
+ (const struct sockaddr *)&dest->ip6,
+ sizeof(dest->ip6));
tmpdest->ip6.sin6_port = tmpport;
close(s);