metrics: fix exported header
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Wed, 26 Apr 2017 12:07:18 +0000 (14:07 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 30 Apr 2017 22:13:15 +0000 (00:13 +0200)
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")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
lib/librte_metrics/rte_metrics.h

index fd0154f..0fa3104 100644 (file)
 #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