Skip to content

Commit ad5b7b1

Browse files
trex58an3l
authored andcommitted
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
1 parent 3826178 commit ad5b7b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sql/wsrep_mysqld.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,11 +550,11 @@ static std::string wsrep_server_incoming_address()
550550
{
551551
if (node_addr.size())
552552
{
553-
size_t const ip_len= wsrep_host_len(node_addr.c_str(), node_addr.size());
554-
if (ip_len + 7 /* :55555\0 */ < inc_addr_max)
553+
size_t const ip_len_mdb= wsrep_host_len(node_addr.c_str(), node_addr.size());
554+
if (ip_len_mdb + 7 /* :55555\0 */ < inc_addr_max)
555555
{
556-
memcpy (inc_addr, node_addr.c_str(), ip_len);
557-
snprintf(inc_addr + ip_len, inc_addr_max - ip_len, ":%u",
556+
memcpy (inc_addr, node_addr.c_str(), ip_len_mdb);
557+
snprintf(inc_addr + ip_len_mdb, inc_addr_max - ip_len_mdb, ":%u",
558558
(int)mysqld_port);
559559
}
560560
else

0 commit comments

Comments
 (0)