compat-2.6.h: Use compat only if CONFIG_COMPAT_RDMA defined
authorVladimir Sokolovsky <vlad@mellanox.com>
Mon, 30 Apr 2018 16:59:12 +0000 (11:59 -0500)
committerVladimir Sokolovsky <vlad@mellanox.com>
Wed, 2 May 2018 15:15:12 +0000 (10:15 -0500)
This will enable to avoid using compat on the base kernel

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
compat/Kconfig [new file with mode: 0644]
include/linux/compat-2.6.h

diff --git a/compat/Kconfig b/compat/Kconfig
new file mode 100644 (file)
index 0000000..140fb67
--- /dev/null
@@ -0,0 +1,4 @@
+config COMPAT_RDMA
+       tristate "Compat layer for RDMA"
+       ---help---
+         Provides compat layer to support older kernel versions
index 9988f47..028597a 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef LINUX_26_COMPAT_H
 #define LINUX_26_COMPAT_H
 
+#include <generated/autoconf.h>
+#ifdef CONFIG_COMPAT_RDMA
+
 #define LINUX_BACKPORT(__sym) backport_ ##__sym
 
 /* Include the autogenerated header file */
@@ -53,4 +56,5 @@ void backport_dependency_symbol(void);
 #include <linux/compat-4.5.h>
 #include <linux/compat-4.9.h>
 
+#endif /* CONFIG_COMPAT_RDMA */
 #endif /* LINUX_26_COMPAT_H */