From 12f43224422a8df0f510f423ac6c9743c38d7a94 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Mon, 1 Aug 2022 17:24:03 -0700 Subject: [PATCH] ANDROID: vendor_hooks: Guard cgroup struct with CONFIG_CGROUPS See commit 573c7f061d10 ("ANDROID: Guard hooks with their CONFIG_ options"). Needed to do CGROUPS as well due to cgroup_subsys definition being guarded by CONFIG_CGROUPS in include/linux/cgroup-defs.h. Bug: 240404657 Change-Id: Ie51f053a9e82ef8d7d1c149374ac02608717429d Signed-off-by: Elliot Berman --- include/trace/hooks/cgroup.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/trace/hooks/cgroup.h b/include/trace/hooks/cgroup.h index 68818ad29600..dfe79e5a3646 100644 --- a/include/trace/hooks/cgroup.h +++ b/include/trace/hooks/cgroup.h @@ -9,12 +9,16 @@ #include struct cgroup_taskset; -#ifdef __GENKSYMS__ +#if defined(__GENKSYMS__) || !IS_ENABLED(CONFIG_CGROUPS) struct cgroup_subsys; -struct task_struct; #else /* struct cgroup_subsys */ #include +#endif + +#ifdef __GENKSYMS__ +struct task_struct; +#else /* struct task_struct */ #include #endif /* __GENKSYMS__ */