struct kmem_cache;
--- a/tools/perf/pmu-events/jevents.py
+++ b/tools/perf/pmu-events/jevents.py
-@@ -684,6 +684,7 @@
+@@ -684,6 +684,7 @@ def main() -> None:
#include "util/header.h"
#include "util/pmu.h"
#include <string.h>
#include <stddef.h>
struct compact_pmu_event {
-# --- a/tools/perf/pmu-events/jevents.c
-# +++ b/tools/perf/pmu-events/jevents.c
-# @@ -1,4 +1,6 @@
-# +#ifdef __linux__
-# #define _XOPEN_SOURCE 500 /* needed for nftw() */
-# +#endif
-# #define _GNU_SOURCE /* needed for asprintf() */
-
-# /* Parse event JSON files */
-# @@ -35,6 +37,7 @@
-# #include <stdlib.h>
-# #include <errno.h>
-# #include <string.h>
-# +#include <strings.h>
-# #include <ctype.h>
-# #include <unistd.h>
-# #include <stdarg.h>
-# --- a/tools/perf/pmu-events/json.c
-# +++ b/tools/perf/pmu-events/json.c
-# @@ -38,7 +38,6 @@
-# #include <unistd.h>
-# #include "jsmn.h"
-# #include "json.h"
-# -#include <linux/kernel.h>
-
-
-# static char *mapfile(const char *fn, size_t *size)