net: wireguard: Add compatibility for Coconut's kernel
Introduce an ISCOCONUT define and use it in the ifdefs to fix build
issues when building against this kernel.
Change-Id: I803d5bc81cab47e003d5a7608706ea781b8d6901
diff --git a/net/wireguard/compat/compat.h b/net/wireguard/compat/compat.h
index 69dada8..b5747cb 100644
--- a/net/wireguard/compat/compat.h
+++ b/net/wireguard/compat/compat.h
@@ -11,6 +11,8 @@
#include <linux/types.h>
#include <generated/utsrelease.h>
+#define ISCOCONUT
+
#ifdef RHEL_MAJOR
#if RHEL_MAJOR == 7
#define ISRHEL7
@@ -1196,4 +1198,7 @@
#define from_timer(var, callback_timer, timer_fieldname) container_of((struct timer_list *)callback_timer, typeof(*var), timer_fieldname)
#endif
+#ifdef ISCOCONUT
+#define fallthrough do { } while(0)
+#endif
#endif /* _WG_COMPAT_H */