]> git.openfabrics.org - compat-rdma/compat.git/commitdiff
rdma.m4: Added macros to support 5.3 backports
authorVladimir Sokolovsky <vlad@mellanox.com>
Tue, 20 Aug 2019 21:54:46 +0000 (16:54 -0500)
committerVladimir Sokolovsky <vlad@mellanox.com>
Tue, 20 Aug 2019 21:54:46 +0000 (16:54 -0500)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
config/rdma.m4

index 43581daf83b934ad9c233a357ea205387f110ab4..480d455b31adfdc5249bf1c798fb7431e0dbcae9 100644 (file)
@@ -8747,6 +8747,66 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
        ],[
                AC_MSG_RESULT(no)
        ])
+       AC_MSG_CHECKING([if struct mm_struct has member atomic_pinned_vm])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/mm_types.h>
+       ],[
+               struct mm_struct x;
+                atomic64_t y;
+               x.pinned_vm = y;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_ATOMIC_PINNED_VM, 1,
+                         [atomic_pinned_vm is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if net/ipv6_stubs.h exists])
+       LB_LINUX_TRY_COMPILE([
+                #include <net/ipv6_stubs.h>
+       ],[
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IPV6_STUBS, 1,
+                         [net/ipv6_stubs.h exists])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if netlink.h has nla_parse_deprecated ])
+       LB_LINUX_TRY_COMPILE([
+               #include <net/netlink.h>
+       ],[
+               nla_parse_deprecated(NULL, 0, NULL, 0, NULL, NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_NLA_PARSE_DEPRECATED, 1,
+                         [nla_parse_deprecated exist])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if xarray is defined])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/xarray.h>
+       ],[
+                struct xa_limit x;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_XARRAY, 1,
+                         [xa_array is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
 ])
 #
 # COMPAT_CONFIG_HEADERS