Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
>---------------------------------------------------------------
commit 1b49f8e4ace1d036adffb98042d18c3f3eabacdd
Author: Marek Lindner <mareklindner(a)neomailbox.ch>
Date: Wed Feb 18 21:38:01 2015 +0800
batman-adv: IS_ENABLED compat code
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
>---------------------------------------------------------------
1b49f8e4ace1d036adffb98042d18c3f3eabacdd
compat.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/compat.h b/compat.h
index 835c6ea..27d8a21 100644
--- a/compat.h
+++ b/compat.h
@@ -240,6 +240,19 @@ static inline void skb_reset_mac_len(struct sk_buff *skb)
#endif /* < KERNEL_VERSION(3, 0, 0) */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
+
+#define __ARG_PLACEHOLDER_1 0,
+#define config_enabled(cfg) _config_enabled(cfg)
+#define _config_enabled(value) __config_enabled(__ARG_PLACEHOLDER_##value)
+#define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0)
+#define ___config_enabled(__ignored, val, ...) val
+
+#define IS_ENABLED(option) \
+ (config_enabled(option) || config_enabled(option##_MODULE))
+
+#endif /* < KERNEL_VERSION(3, 1, 0) */
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
#define batadv_interface_add_vid(x, y, z) \