Skip to content

Commit 33b725c

Browse files
captain5050namhyung
authored andcommitted
perf trace: Avoid compile error wrt redefining bool
Make part of an existing TODO conditional to avoid the following build error: ``` tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c:26:14: error: cannot combine with previous 'char' declaration specifier 26 | typedef char bool; | ^ include/stdbool.h:20:14: note: expanded from macro 'bool' 20 | #define bool _Bool | ^ tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c:26:1: error: typedef requires a name [-Werror,-Wmissing-declarations] 26 | typedef char bool; | ^~~~~~~~~~~~~~~~~ 2 errors generated. ``` Signed-off-by: Ian Rogers <[email protected]> Cc: Leo Yan <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 4a73fca commit 33b725c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c

+2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
#define MAX_CPUS 4096
2424

2525
// FIXME: These should come from system headers
26+
#ifndef bool
2627
typedef char bool;
28+
#endif
2729
typedef int pid_t;
2830
typedef long long int __s64;
2931
typedef __s64 time64_t;

0 commit comments

Comments
 (0)