From: Michael Jeanson Date: Wed, 14 Oct 2015 21:06:12 +0000 (-0400) Subject: Fix: Silence warning by casting *sin_addr to *sockaddr X-Git-Tag: v2.8.0-rc1~257 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=14b88ccfe8d51fe8a19e525d8b6a5e4614eccb46;p=lttng-tools.git Fix: Silence warning by casting *sin_addr to *sockaddr Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/sessiond-comm/inet.c b/src/common/sessiond-comm/inet.c index 5727c9119..35ce3b6b5 100644 --- a/src/common/sessiond-comm/inet.c +++ b/src/common/sessiond-comm/inet.c @@ -103,7 +103,7 @@ int lttcomm_bind_inet_sock(struct lttcomm_sock *sock) { int ret; - ret = bind(sock->fd, &sock->sockaddr.addr.sin, + ret = bind(sock->fd, (const struct sockaddr *) &sock->sockaddr.addr.sin, sizeof(sock->sockaddr.addr.sin)); if (ret < 0) { PERROR("bind inet"); diff --git a/src/common/sessiond-comm/inet6.c b/src/common/sessiond-comm/inet6.c index db5cda2e1..a29adad42 100644 --- a/src/common/sessiond-comm/inet6.c +++ b/src/common/sessiond-comm/inet6.c @@ -101,7 +101,7 @@ int lttcomm_bind_inet6_sock(struct lttcomm_sock *sock) { int ret; - ret = bind(sock->fd, &sock->sockaddr.addr.sin6, + ret = bind(sock->fd, (const struct sockaddr *) &sock->sockaddr.addr.sin6, sizeof(sock->sockaddr.addr.sin6)); if (ret < 0) { PERROR("bind inet6");