summaryrefslogtreecommitdiff
path: root/tools/include/linux/compiler.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2020-07-11 23:53:28 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-07-13 10:42:03 -0700
commite5a0516ec9681daf5c1f0d05144d21430b6ca6d7 (patch)
treeec98e40e43922f3c43a35232dce59a068597aa2f /tools/include/linux/compiler.h
parent232ce4be295743deb2cf9a7cf9c60a4fde367964 (diff)
tools headers: Adopt verbatim copy of btf_ids.h from kernel sources
It will be needed by bpf selftest for resolve_btfids tool. Also adding __PASTE macro as btf_ids.h dependency, which is defined in: include/linux/compiler_types.h but because tools/include do not have this header, I'm putting the macro into linux/compiler.h header. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Tested-by: Andrii Nakryiko <andriin@fb.com> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200711215329.41165-9-jolsa@kernel.org
Diffstat (limited to 'tools/include/linux/compiler.h')
-rw-r--r--tools/include/linux/compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
index 9f9002734e19..6eac24d44e81 100644
--- a/tools/include/linux/compiler.h
+++ b/tools/include/linux/compiler.h
@@ -201,4 +201,8 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
# define __fallthrough
#endif
+/* Indirect macros required for expanded argument pasting, eg. __LINE__. */
+#define ___PASTE(a, b) a##b
+#define __PASTE(a, b) ___PASTE(a, b)
+
#endif /* _TOOLS_LINUX_COMPILER_H */