summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pimd/pim_igmpv3.c3
-rw-r--r--pimd/pim_pim.c3
-rw-r--r--pimd/pim_ssmpingd.c5
3 files changed, 7 insertions, 4 deletions
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c
index 3baddbfa..3657f2f9 100644
--- a/pimd/pim_igmpv3.c
+++ b/pimd/pim_igmpv3.c
@@ -1680,7 +1680,8 @@ void pim_igmp_send_membership_query(struct igmp_group *group,
#endif
tolen = sizeof(to);
- sent = sendto(fd, query_buf, msg_size, MSG_DONTWAIT, &to, tolen);
+ sent = sendto(fd, query_buf, msg_size, MSG_DONTWAIT,
+ (struct sockaddr *)&to, tolen);
if (sent != (ssize_t) msg_size) {
int e = errno;
char dst_str[100];
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index f6f4c953..f8ac650d 100644
--- a/pimd/pim_pim.c
+++ b/pimd/pim_pim.c
@@ -476,7 +476,8 @@ int pim_msg_send(int fd,
pim_pkt_dump(__PRETTY_FUNCTION__, pim_msg, pim_msg_size);
}
- sent = sendto(fd, pim_msg, pim_msg_size, MSG_DONTWAIT, &to, tolen);
+ sent = sendto(fd, pim_msg, pim_msg_size, MSG_DONTWAIT,
+ (struct sockaddr *)&to, tolen);
if (sent != (ssize_t) pim_msg_size) {
int e = errno;
char dst_str[100];
diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c
index fd1eac06..82e0722a 100644
--- a/pimd/pim_ssmpingd.c
+++ b/pimd/pim_ssmpingd.c
@@ -96,7 +96,7 @@ static int ssmpingd_socket(struct in_addr addr, int port, int mttl)
sockaddr.sin_addr = addr;
sockaddr.sin_port = htons(port);
- if (bind(fd, &sockaddr, sizeof(sockaddr))) {
+ if (bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr))) {
char addr_str[100];
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
zlog_warn("%s: bind(fd=%d,addr=%s,port=%d,len=%zu) failure: errno=%d: %s",
@@ -222,7 +222,8 @@ static void ssmpingd_sendto(struct ssmpingd_sock *ss,
socklen_t tolen = sizeof(to);
int sent;
- sent = sendto(ss->sock_fd, buf, len, MSG_DONTWAIT, &to, tolen);
+ sent = sendto(ss->sock_fd, buf, len, MSG_DONTWAIT,
+ (struct sockaddr *)&to, tolen);
if (sent != len) {
int e = errno;
char to_str[100];