diff options
| author | Tony Reix <tony.reix@atos.net> | 2019-05-19 20:40:40 -0700 |
|---|---|---|
| committer | Anel Husakovic <anel@mariadb.org> | 2019-11-29 07:00:33 +0100 |
| commit | 500d85d50a9a6e9e23bbf4cd61e081bbcc4b61c0 (patch) | |
| tree | 1a1c5ea806c0dfdf08cdaa580b2248070b005078 | |
| parent | 3826178da89f987ebf641bcd92d4a714d51b3ecb (diff) | |
| download | mariadb-git-500d85d50a9a6e9e23bbf4cd61e081bbcc4b61c0.tar.gz | |
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 <tony.reix@atos.net>.
This patch was submitted under MCA.
Closes #1307
| -rw-r--r-- | sql/wsrep_mysqld.cc | 8 |
1 files 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 |
