[dpdk-dev,v3,10/14] metrics: fix errors in exported header

Message ID a8672684604ee0142eed184d3b21c6e1743eabf2.1493208189.git.adrien.mazarguil@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Adrien Mazarguil April 26, 2017, 12:07 p.m. UTC
  This commit addresses the following compilation errors:

 In file included from /tmp/check-includes.sh.21060.c:1:0:
 build/include/rte_metrics.h:91:2: error: unknown type name 'uint16_t'
 [...]

It also adds C++ awareness to rte_metrics.h.

Fixes: 349950ddb9c5 ("metrics: add information metrics library")

Cc: Remy Horton <remy.horton@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 lib/librte_metrics/rte_metrics.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
  

Comments

Remy Horton April 26, 2017, 3:07 p.m. UTC | #1
On 26/04/2017 13:07, Adrien Mazarguil wrote:
[..]
> Cc: Remy Horton <remy.horton@intel.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
>  lib/librte_metrics/rte_metrics.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Acked-by: Remy Horton <remy.horton@intel.com>
  

Patch

diff --git a/lib/librte_metrics/rte_metrics.h b/lib/librte_metrics/rte_metrics.h
index fd0154f..0fa3104 100644
--- a/lib/librte_metrics/rte_metrics.h
+++ b/lib/librte_metrics/rte_metrics.h
@@ -52,6 +52,12 @@ 
 #ifndef _RTE_METRICS_H_
 #define _RTE_METRICS_H_
 
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** Maximum length of metric name (including null-terminator) */
 #define RTE_METRICS_MAX_NAME_LEN 64
 
@@ -237,4 +243,8 @@  int rte_metrics_update_values(
 	const uint64_t *values,
 	uint32_t count);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif