From ad5b7b157b43ab5d14f55b45a8a26dac2c3d923b Mon Sep 17 00:00:00 2001 From: Tony Reix Date: Sun, 19 May 2019 20:40:40 -0700 Subject: [PATCH] MDEV-19510 Issue with: sql/wsrep_mysqld.cc : ip_len Patch `36a2a185fe18` introduced `wsrep_server_incoming_address()` in `10.4`. Since AIX `/usr/include/netinet/ip.h` header defines `ip_len` as `ip_ff.ip_flen` and `size_t const ip_len` is preprocessed as `size_t const ip_ff.ip_vhltl.ip_x.ip_xlen`, to prevent the define from overwriting code in MariaDB, rename the variable name to `ip_len_mdb`. This patch is done by Tony Reix . This patch was submitted under MCA. Closes #1307 --- sql/wsrep_mysqld.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 1ac5b39ff29..d9346dfd4b6 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -550,11 +550,11 @@ static std::string wsrep_server_incoming_address() { if (node_addr.size()) { - size_t const ip_len= wsrep_host_len(node_addr.c_str(), node_addr.size()); - if (ip_len + 7 /* :55555\0 */ < inc_addr_max) + size_t const ip_len_mdb= wsrep_host_len(node_addr.c_str(), node_addr.size()); + if (ip_len_mdb + 7 /* :55555\0 */ < inc_addr_max) { - memcpy (inc_addr, node_addr.c_str(), ip_len); - snprintf(inc_addr + ip_len, inc_addr_max - ip_len, ":%u", + memcpy (inc_addr, node_addr.c_str(), ip_len_mdb); + snprintf(inc_addr + ip_len_mdb, inc_addr_max - ip_len_mdb, ":%u", (int)mysqld_port); } else