diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-07 03:09:45 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-07 03:09:45 +0200 |
commit | 6548aad834639990f407a24a5de38c2eb435dae9 (patch) | |
tree | 9120a656235df1c3b12b6516a89b0ec6924a1cfa | |
parent | 318893096ba2474c83cfd7b4f8ba4cb163b53430 (diff) |
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.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/compat/compat.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 <linux/bug.h> +#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 <linux/ip.h> |