From fd50f778ab7683afe280b84c8242fa6d66843e08 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 7 Oct 2018 03:09:45 +0200 Subject: compat: clang cannot handle __builtin_constant_p Or, put differently, we don't want to go chasing down random versions of clang used by XDA users, so we just disable this checking on clang all together. --- src/compat/compat.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/compat') diff --git a/src/compat/compat.h b/src/compat/compat.h index 796736c..58636da 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -741,6 +741,13 @@ static inline void crypto_xor_cpy(u8 *dst, const u8 *src1, const u8 *src2, #define hlist_add_behind(a, b) hlist_add_after(b, a) #endif +/* https://github.com/ClangBuiltLinux/linux/issues/7 */ +#ifdef __clang__ +#include +#undef BUILD_BUG_ON +#define BUILD_BUG_ON(x) +#endif + /* https://lkml.kernel.org/r/20170624021727.17835-1-Jason@zx2c4.com */ #if IS_ENABLED(CONFIG_NF_CONNTRACK) #include -- cgit v1.2.3-59-g8ed1b