summaryrefslogtreecommitdiff
path: root/ctdb/common
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2018-06-27 13:41:38 +1000
committerMartin Schwenke <martins@samba.org>2018-07-02 08:51:20 +0200
commit79992dbb73ac9749ac987cb6a88964fa600b4c35 (patch)
tree7f0d4f7aa512e24278e4a40ba937d935b66a8c79 /ctdb/common
parent7eeba9c5a4541e581b062fb9ee26f13b7373c541 (diff)
downloadsamba-79992dbb73ac9749ac987cb6a88964fa600b4c35.tar.gz
ctdb-common: Use sin6_len only if the structure supports it
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/ctdb_util.c4
-rw-r--r--ctdb/common/system_util.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c
index cbab3672a67..0f367c2100e 100644
--- a/ctdb/common/ctdb_util.c
+++ b/ctdb/common/ctdb_util.c
@@ -359,8 +359,8 @@ void ctdb_canonicalize_ip(const ctdb_sock_addr *ip, ctdb_sock_addr *cip)
sizeof(cip->ip.sin_addr));
} else {
cip->ip6.sin6_family = AF_INET6;
-#ifdef HAVE_SOCK_SIN_LEN
- cip->ip6.sin_len = sizeof(ctdb_sock_addr);
+#ifdef HAVE_SOCK_SIN6_LEN
+ cip->ip6.sin6_len = sizeof(ctdb_sock_addr);
#endif
cip->ip6.sin6_port = ip->ip6.sin6_port;
memcpy(&cip->ip6.sin6_addr,
diff --git a/ctdb/common/system_util.c b/ctdb/common/system_util.c
index f27eed7038d..f1e9763c52a 100644
--- a/ctdb/common/system_util.c
+++ b/ctdb/common/system_util.c
@@ -154,7 +154,7 @@ static bool parse_ipv6(const char *s, const char *ifaces, unsigned port, ctdb_so
saddr->ip6.sin6_scope_id = if_nametoindex(ifaces);
}
-#ifdef HAVE_SOCK_SIN_LEN
+#ifdef HAVE_SOCK_SIN6_LEN
saddr->ip6.sin6_len = sizeof(*saddr);
#endif
return true;