aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-07 03:09:45 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-07 03:09:45 +0200
commitfd50f778ab7683afe280b84c8242fa6d66843e08 (patch)
tree4921142be578ac59c00d5142e5bd4af17e8e12dc
parentcompat: make asm/simd.h conditional on its existence (diff)
downloadwireguard-monolithic-historical-fd50f778ab7683afe280b84c8242fa6d66843e08.tar.xz
wireguard-monolithic-historical-fd50f778ab7683afe280b84c8242fa6d66843e08.zip
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.
Diffstat (limited to '')
-rw-r--r--src/compat/compat.h7
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>