aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <[email protected]>2022-11-13 20:08:02 +0900
committerAndrew Morton <[email protected]>2022-11-30 16:13:18 -0800
commitde985c109096b236d43e98da0c65376bf3bc24fb (patch)
tree689ab176fb51ac6d619b53ac3b9a9d8c377b17c4
parente92a216d16bde65d21a3227e0fb2aa0794576525 (diff)
linux/init.h: include <linux/build_bug.h> and <linux/stringify.h>
With CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y, the following code fails to build: ---------------->8---------------- #include <linux/init.h> int foo(void) { return 0; } core_initcall(foo); ---------------->8---------------- Include <linux/build_bug.h> for static_assert() and <linux/stringify.h> for __stringify(). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Masahiro Yamada <[email protected]> Cc: Jiangshan Yi <[email protected]> Cc: Kees Cook <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Randy Dunlap <[email protected]> # build-tested Cc: Sami Tolvanen <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--include/linux/init.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index 2e96756fe1ff..c5fe6d26f5b1 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -2,7 +2,9 @@
#ifndef _LINUX_INIT_H
#define _LINUX_INIT_H
+#include <linux/build_bug.h>
#include <linux/compiler.h>
+#include <linux/stringify.h>
#include <linux/types.h>
/* Built-in __init functions needn't be compiled with retpoline */