]> git.openfabrics.org - ~emulex/for-vlad/compat.git/commitdiff
Fixed netlink_dump_start backport
authorVladimir Sokolovsky <vlad@mellanox.com>
Mon, 5 Jan 2015 17:42:28 +0000 (19:42 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Mon, 5 Jan 2015 17:42:28 +0000 (19:42 +0200)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
config/rdma.m4
include/linux/compat-3.1.h

index 94a01b4fe47b2a552ae765e83dbd066b8cc5db98..233d3508ba591ba555855428780da2cbb02169c6 100644 (file)
@@ -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 <linux/netlink.h>
+       ],[
+               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 <net/dcbnl.h>
index 558f1bc17115ad4321f112f40f683dc833026fda..7b05951566d24de573eab9ac3948423a0b92069f 100644 (file)
@@ -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 <linux/netlink.h>
 /* remove last arg */
 #define netlink_dump_start(a, b, c, d, e, f) netlink_dump_start(a, b, c, d, e)