Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
perf trace: Avoid compile error wrt redefining bool
Browse files Browse the repository at this point in the history
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 <irogers@google.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230913184957.230076-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
  • Loading branch information
captain5050 authored and namhyung committed Sep 17, 2023
1 parent 4a73fca commit 33b725c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#define MAX_CPUS 4096

// FIXME: These should come from system headers
#ifndef bool
typedef char bool;
#endif
typedef int pid_t;
typedef long long int __s64;
typedef __s64 time64_t;
Expand Down

0 comments on commit 33b725c

Please sign in to comment.