summaryrefslogtreecommitdiffstats
path: root/lib/librte_metrics
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_metrics')
-rw-r--r--lib/librte_metrics/Makefile1
-rw-r--r--lib/librte_metrics/rte_metrics.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/librte_metrics/Makefile b/lib/librte_metrics/Makefile
index d4990e83..a6efba4a 100644
--- a/lib/librte_metrics/Makefile
+++ b/lib/librte_metrics/Makefile
@@ -35,6 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_metrics.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+LDLIBS += -lrte_eal
EXPORT_MAP := rte_metrics_version.map
diff --git a/lib/librte_metrics/rte_metrics.c b/lib/librte_metrics/rte_metrics.c
index b66a72bb..d9404001 100644
--- a/lib/librte_metrics/rte_metrics.c
+++ b/lib/librte_metrics/rte_metrics.c
@@ -115,7 +115,7 @@ rte_metrics_reg_name(const char *name)
int
rte_metrics_reg_names(const char * const *names, uint16_t cnt_names)
{
- struct rte_metrics_meta_s *entry;
+ struct rte_metrics_meta_s *entry = NULL;
struct rte_metrics_data_s *stats;
const struct rte_memzone *memzone;
uint16_t idx_name;