diff mbox series

kernel-shark: Fix compile error: ‘string’ in namespace ‘std’ does not name a type

Message ID 20210205111242.57557-1-tz.stoyanov@gmail.com (mailing list archive)
State Accepted
Commit f05e3e75bd95cb7e0e5849899d70fd6aeb24f5cc
Headers show
Series kernel-shark: Fix compile error: ‘string’ in namespace ‘std’ does not name a type | expand

Commit Message

Tzvetomir Stoyanov (VMware) Feb. 5, 2021, 11:12 a.m. UTC
From: Tzvetomir (VMware)  Stoyanov <tz.stoyanov@gmail.com>

There is a compilation error when compiling KernelShark on Fedora 33
with c++ (GCC) 10.2.1:

  src/KsPlotTools.hpp:349:37: error: ‘string’ in namespace ‘std’ does not name a type

"string" should be included in that header file, as it is a direct
dependency.

Signed-off-by: Tzvetomir (VMware)  Stoyanov <tz.stoyanov@gmail.com>
---
 src/KsPlotTools.hpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Yordan Karadzhov Feb. 8, 2021, 10:34 a.m. UTC | #1
On 5.02.21 г. 13:12 ч., Tzvetomir Stoyanov (VMware) wrote:
> From: Tzvetomir (VMware)  Stoyanov <tz.stoyanov@gmail.com>
> 
> There is a compilation error when compiling KernelShark on Fedora 33
> with c++ (GCC) 10.2.1:
> 
>    src/KsPlotTools.hpp:349:37: error: ‘string’ in namespace ‘std’ does not name a type
> 
> "string" should be included in that header file, as it is a direct
> dependency.
> 
> Signed-off-by: Tzvetomir (VMware)  Stoyanov <tz.stoyanov@gmail.com>
> ---
>   src/KsPlotTools.hpp | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/src/KsPlotTools.hpp b/src/KsPlotTools.hpp
> index 1725926..68bd6f7 100644
> --- a/src/KsPlotTools.hpp
> +++ b/src/KsPlotTools.hpp
> @@ -15,6 +15,7 @@
>   // C++
>   #include <forward_list>
>   #include <unordered_map>
> +#include <string>
>   
>   // KernelShark
>   #include "libkshark.h"
> 

Thanks Ceco!

Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
diff mbox series

Patch

diff --git a/src/KsPlotTools.hpp b/src/KsPlotTools.hpp
index 1725926..68bd6f7 100644
--- a/src/KsPlotTools.hpp
+++ b/src/KsPlotTools.hpp
@@ -15,6 +15,7 @@ 
 // C++
 #include <forward_list>
 #include <unordered_map>
+#include <string>
 
 // KernelShark
 #include "libkshark.h"