]> git.droids-corp.org - dpdk.git/commitdiff
bitrate: fix exported header
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Wed, 26 Apr 2017 12:07:16 +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 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")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
lib/librte_bitratestats/rte_bitrate.h

index b9f11bd20d5632407c16457995a97d17948f7415..15fc270a366bdba286242a9a7a6f5f4e810cb523 100644 (file)
 #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_ */