Skip to content

Commit

Permalink
perf tools: Add missing headers needed by util/data.h
Browse files Browse the repository at this point in the history
[ Upstream commit 4d27cf1 ]

'struct perf_data' in util/data.h uses the "u64" data type, which is
defined in "linux/types.h".

If we only include util/data.h, the following compilation error occurs:

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

Solution: include "linux/types.h." to add the needed type definitions.

Fixes: 258031c ("perf header: Add DIR_FORMAT feature to describe directory data")
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220429090539.212448-1-yangjihong1@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yang Jihong authored and gregkh committed Jun 9, 2022
1 parent 79c431e commit 4ae67e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/perf/util/data.h
Expand Up @@ -4,6 +4,7 @@

#include <stdio.h>
#include <stdbool.h>
#include <linux/types.h>

enum perf_data_mode {
PERF_DATA_MODE_WRITE,
Expand Down

0 comments on commit 4ae67e8

Please sign in to comment.