diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 4f2a819fd60a34..e466718fbb87d9 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -5,7 +5,7 @@ #ifndef __ASSEMBLY__ #if defined(CONFIG_DEBUG_INFO_BTF) && defined(CONFIG_PAHOLE_HAS_BTF_TAG) && \ - __has_attribute(btf_type_tag) + __has_attribute(btf_type_tag) && !defined(__BINDGEN__) # define BTF_TYPE_TAG(value) __attribute__((btf_type_tag(#value))) #else # define BTF_TYPE_TAG(value) /* nothing */ diff --git a/rust/Makefile b/rust/Makefile index a64c63c06a9f5c..2d5e0bd1df8e70 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -297,7 +297,7 @@ else bindgen_c_flags_lto = $(bindgen_c_flags) endif -bindgen_c_flags_final = $(bindgen_c_flags_lto) +bindgen_c_flags_final = $(bindgen_c_flags_lto) -D__BINDGEN__ quiet_cmd_bindgen = BINDGEN $@ cmd_bindgen = \