Skip to content

Commit

Permalink
metrics: add missing C++ guards
Browse files Browse the repository at this point in the history
[ upstream commit 4e90b3a ]

Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.

Fixes: c5b7197 ("telemetry: move some functions to metrics library")

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  • Loading branch information
bdoole1 authored and bluca committed Feb 28, 2022
1 parent c840104 commit 8f9c5d8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/librte_metrics/rte_metrics_telemetry.h
Expand Up @@ -13,6 +13,9 @@
#ifndef _RTE_METRICS_TELEMETRY_H_
#define _RTE_METRICS_TELEMETRY_H_

#ifdef __cplusplus
extern "C" {
#endif

enum rte_telemetry_stats_type {
PORT_STATS = 0,
Expand Down Expand Up @@ -60,4 +63,8 @@ __rte_experimental
int32_t
rte_metrics_tel_extract_data(struct telemetry_encode_param *ep, json_t *data);

#ifdef __cplusplus
}
#endif

#endif

0 comments on commit 8f9c5d8

Please sign in to comment.