mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02:00
BUILD: tcp_sample: var_fc_counter defined but not used
var_fc_counter is not used on Illumos and emit a warning src/tcp_sample.c:291:12: warning: ‘var_fc_counter’ defined but not used [-Wunused-function] 291 | static int var_fc_counter(struct arg *args, char **err) | ^~~~~~~~~~~~~~ Let's add an ifdef to build it.
This commit is contained in:
parent
079193e375
commit
da1331b0b5
@ -288,6 +288,7 @@ static int val_fc_time_value(struct arg *args, char **err)
|
|||||||
* case, the argument is ignored and a warning is emitted. Returns 0 on error
|
* case, the argument is ignored and a warning is emitted. Returns 0 on error
|
||||||
* and non-zero if OK.
|
* and non-zero if OK.
|
||||||
*/
|
*/
|
||||||
|
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
|
||||||
static int var_fc_counter(struct arg *args, char **err)
|
static int var_fc_counter(struct arg *args, char **err)
|
||||||
{
|
{
|
||||||
if (args[0].type != ARGT_STOP) {
|
if (args[0].type != ARGT_STOP) {
|
||||||
@ -299,6 +300,7 @@ static int var_fc_counter(struct arg *args, char **err)
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Returns some tcp_info data if it's available. "dir" must be set to 0 if
|
/* Returns some tcp_info data if it's available. "dir" must be set to 0 if
|
||||||
* the client connection is required, otherwise it is set to 1. "val" represents
|
* the client connection is required, otherwise it is set to 1. "val" represents
|
||||||
|
Loading…
Reference in New Issue
Block a user