From 2ce3976023aa6f7532b0e42a13a74460f4e5353c Mon Sep 17 00:00:00 2001 From: diphons Date: Sun, 4 Jun 2023 08:15:03 +0700 Subject: [PATCH] Fixup: build under linux 4.14 (#581) Split compiler_types.h from compiler.h only available for linux 4.14 --- kernel/allowlist.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/allowlist.c b/kernel/allowlist.c index 1c117f6e..f6d8c3c7 100644 --- a/kernel/allowlist.c +++ b/kernel/allowlist.c @@ -1,6 +1,5 @@ #include "ksu.h" #include "linux/compiler.h" -#include "linux/compiler_types.h" #include "linux/fs.h" #include "linux/gfp.h" #include "linux/kernel.h" @@ -8,6 +7,10 @@ #include "linux/printk.h" #include "linux/slab.h" #include "linux/version.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) +#include "linux/compiler_types.h" +#endif + #include "klog.h" // IWYU pragma: keep #include "selinux/selinux.h" #include "kernel_compat.h" @@ -377,4 +380,4 @@ void ksu_allowlist_exit(void) kfree(np); } mutex_unlock(&allowlist_mutex); -} \ No newline at end of file +}