[dpdk-dev,v3,08/14] bitrate: fix errors in exported header

Message ID fb85d94ac137377638c5b1c4e9673143370b7cf5.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 error:

 In file included from /tmp/check-includes.sh.28023.c:1:0:
 build/include/rte_bitrate.h:82:2: error: unknown type name 'uint8_t'
 [...]

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

Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")

Cc: Remy Horton <remy.horton@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 lib/librte_bitratestats/rte_bitrate.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_bitratestats/rte_bitrate.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)

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

Patch

diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index b9f11bd..15fc270 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -34,6 +34,12 @@ 
 #ifndef _RTE_BITRATE_H_
 #define _RTE_BITRATE_H_
 
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  *  Bitrate statistics data structure.
  *  This data structure is intentionally opaque.
@@ -81,4 +87,8 @@  int rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data);
 int rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
 	uint8_t port_id);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_BITRATE_H_ */