The typedef for handler creates shadow declaration warnings in other drivers with variables of that name. Add telemetry_ prefix like other variables in the library.
Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- lib/telemetry/rte_telemetry.h | 2 +- lib/telemetry/telemetry.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h index c4554e4028..4202847cd7 100644 --- a/lib/telemetry/rte_telemetry.h +++ b/lib/telemetry/rte_telemetry.h @@ -369,7 +369,7 @@ typedef int (*telemetry_arg_cb)(const char *cmd, const char *params, void *arg, * @return * Void. */ -typedef void * (*handler)(void *sock_id); +typedef void * (*telemetry_handler)(void *sock_id); /** * Used when registering a command and callback function with telemetry. diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c index 1cbbffbf3f..7b8fee0e0e 100644 --- a/lib/telemetry/telemetry.c +++ b/lib/telemetry/telemetry.c @@ -47,7 +47,7 @@ struct cmd_callback { struct socket { int sock; char path[sizeof(((struct sockaddr_un *)0)->sun_path)]; - handler fn; + telemetry_handler fn; RTE_ATOMIC(uint16_t) *num_clients; }; static struct socket v2_socket; /* socket for v2 telemetry */ -- 2.47.2