mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUILD: dumpstats: fix build error on Solaris
Since the recent addition of map updates, haproxy does not build anymore on Solaris because "s_addr" is a #define : src/dumpstats.c: In function `stats_map_lookup': src/dumpstats.c:4688: error: syntax error before '.' token src/dumpstats.c:4781: error: `S_un' undeclared (first use in this function) src/dumpstats.c:4781: error: (Each undeclared identifier is reported only once src/dumpstats.c:4781: error: for each function it appears in.) make: *** [src/dumpstats.o] Error 1 Simply rename the variable.
This commit is contained in:
parent
0f28f82cec
commit
b908befdae
@ -4685,7 +4685,7 @@ static int stats_map_lookup(struct stream_interface *si)
|
|||||||
struct pat_idx_elt *elt;
|
struct pat_idx_elt *elt;
|
||||||
enum pat_match_res res;
|
enum pat_match_res res;
|
||||||
struct sockaddr_in addr;
|
struct sockaddr_in addr;
|
||||||
char s_addr[INET_ADDRSTRLEN];
|
char addr_str[INET_ADDRSTRLEN];
|
||||||
|
|
||||||
switch (appctx->st2) {
|
switch (appctx->st2) {
|
||||||
case STAT_ST_INIT:
|
case STAT_ST_INIT:
|
||||||
@ -4778,8 +4778,8 @@ static int stats_map_lookup(struct stream_interface *si)
|
|||||||
/* convert ip */
|
/* convert ip */
|
||||||
memcpy(&addr.sin_addr, elt->node.key, 4);
|
memcpy(&addr.sin_addr, elt->node.key, 4);
|
||||||
addr.sin_family = AF_INET;
|
addr.sin_family = AF_INET;
|
||||||
if (addr_to_str((struct sockaddr_storage *)&addr, s_addr, INET_ADDRSTRLEN))
|
if (addr_to_str((struct sockaddr_storage *)&addr, addr_str, INET_ADDRSTRLEN))
|
||||||
chunk_appendf(&trash, "match=\"%s/%d\", ", s_addr, elt->node.node.pfx);
|
chunk_appendf(&trash, "match=\"%s/%d\", ", addr_str, elt->node.node.pfx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user