From e62e8f4d4ab988480191fdb2cc4f47e55b3a90d4 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Mon, 5 Jan 2015 19:42:28 +0200 Subject: [PATCH] Fixed netlink_dump_start backport Signed-off-by: Vladimir Sokolovsky --- config/rdma.m4 | 15 +++++++++++++++ include/linux/compat-3.1.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/config/rdma.m4 b/config/rdma.m4 index 94a01b4..233d350 100644 --- a/config/rdma.m4 +++ b/config/rdma.m4 @@ -1655,6 +1655,21 @@ AC_DEFUN([LINUX_CONFIG_COMPAT], AC_MSG_RESULT(no) ]) + AC_MSG_CHECKING([if netlink_dump_start has 5 parameters]) + LB_LINUX_TRY_COMPILE([ + #include + ],[ + int ret = netlink_dump_start(NULL, NULL, NULL, NULL, NULL); + + return 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_NETLINK_DUMP_START_5P, 1, + [ is defined]) + ],[ + AC_MSG_RESULT(no) + ]) + AC_MSG_CHECKING([if struct dcbnl_rtnl_ops has ieee_getmaxrate/ieee_setmaxrate]) LB_LINUX_TRY_COMPILE([ #include diff --git a/include/linux/compat-3.1.h b/include/linux/compat-3.1.h index 558f1bc..7b05951 100644 --- a/include/linux/compat-3.1.h +++ b/include/linux/compat-3.1.h @@ -47,7 +47,7 @@ static inline struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev return skb; } -#if ! defined(HAVE_NETLINK_DUMP_START_6P) +#ifdef HAVE_NETLINK_DUMP_START_5P #include /* remove last arg */ #define netlink_dump_start(a, b, c, d, e, f) netlink_dump_start(a, b, c, d, e) -- 2.41.0