From: Vladimir Sokolovsky Date: Tue, 20 Aug 2019 21:54:46 +0000 (-0500) Subject: rdma.m4: Added macros to support 5.3 backports X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=33bf7b29e06c21871dce38c8405c9d6bb899f32c;p=compat-rdma%2Fcompat.git rdma.m4: Added macros to support 5.3 backports Signed-off-by: Vladimir Sokolovsky --- diff --git a/config/rdma.m4 b/config/rdma.m4 index 43581da..480d455 100644 --- a/config/rdma.m4 +++ b/config/rdma.m4 @@ -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 + ],[ + 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 + ],[ + 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 + ],[ + 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 + ],[ + 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