summaryrefslogtreecommitdiff
path: root/ctdb/common/system_linux.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-11-25 16:59:51 +0100
committerMichael Adam <obnox@samba.org>2011-11-26 00:34:54 +0100
commitd9516a8bf96066705bbb4b9cf1f31aac6e75a961 (patch)
treef54dbc18f50235474cc7668f031ff6486b05f054 /ctdb/common/system_linux.c
parente931453a2297c358bb1c998ef3decccff31c0eb2 (diff)
downloadsamba-d9516a8bf96066705bbb4b9cf1f31aac6e75a961.tar.gz
system_linux: correctly cast sockaddr_in to sockaddr in ctdb_sys_send_tcp()
(This used to be ctdb commit cc60df5a3edebfdf50fcd22ebfaad35736f90379)
Diffstat (limited to 'ctdb/common/system_linux.c')
-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 2dcdffb3ece..b063abb8e04 100644
--- a/ctdb/common/system_linux.c
+++ b/ctdb/common/system_linux.c
@@ -353,7 +353,9 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
set_nonblocking(s);
set_close_on_exec(s);
- ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0, &dest->ip, sizeof(dest->ip));
+ ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0,
+ (const struct sockaddr *)&dest->ip,
+ sizeof(dest->ip));
close(s);
if (ret != sizeof(ip4pkt)) {
DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));