linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf: make util/data.h self-contained
@ 2022-04-29  9:05 Yang Jihong
  2022-04-30 15:31 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Jihong @ 2022-04-29  9:05 UTC (permalink / raw)
  To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	namhyung, ak, adrian.hunter, linux-perf-users, linux-kernel
  Cc: yangjihong1

struct perf_data in util/data.h uses "u64" data type, which is defined in
"linux/types.h". If only include util/data.h, following compilation error
occur:

util/data.h:38:3: error: unknown type name ‘u64’
   u64    version;
   ^~~

Solution: include "linux/types.h." to resolve self-contained issues

Fixes: 258031c017c35 (perf header: Add DIR_FORMAT feature to describe directory data)
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
---
 tools/perf/util/data.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h
index c9de82af5584..1402d9657ef2 100644
--- a/tools/perf/util/data.h
+++ b/tools/perf/util/data.h
@@ -4,6 +4,7 @@
 
 #include <stdio.h>
 #include <stdbool.h>
+#include <linux/types.h>
 
 enum perf_data_mode {
 	PERF_DATA_MODE_WRITE,
-- 
2.30.GIT


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf: make util/data.h self-contained
  2022-04-29  9:05 [PATCH] perf: make util/data.h self-contained Yang Jihong
@ 2022-04-30 15:31 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-04-30 15:31 UTC (permalink / raw)
  To: Yang Jihong
  Cc: peterz, mingo, mark.rutland, alexander.shishkin, jolsa, namhyung,
	ak, adrian.hunter, linux-perf-users, linux-kernel

Em Fri, Apr 29, 2022 at 05:05:39PM +0800, Yang Jihong escreveu:
> struct perf_data in util/data.h uses "u64" data type, which is defined in
> "linux/types.h". If only include util/data.h, following compilation error
> occur:
> 
> util/data.h:38:3: error: unknown type name ‘u64’
>    u64    version;
>    ^~~
> 
> Solution: include "linux/types.h." to resolve self-contained issues

Thanks, applied.

- Arnaldo

 
> Fixes: 258031c017c35 (perf header: Add DIR_FORMAT feature to describe directory data)
> Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
> ---
>  tools/perf/util/data.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h
> index c9de82af5584..1402d9657ef2 100644
> --- a/tools/perf/util/data.h
> +++ b/tools/perf/util/data.h
> @@ -4,6 +4,7 @@
>  
>  #include <stdio.h>
>  #include <stdbool.h>
> +#include <linux/types.h>
>  
>  enum perf_data_mode {
>  	PERF_DATA_MODE_WRITE,
> -- 
> 2.30.GIT

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-30 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29  9:05 [PATCH] perf: make util/data.h self-contained Yang Jihong
2022-04-30 15:31 ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).