compat: kernels <= 3.0 handle netlink_dump_start API change
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Mon, 21 May 2012 12:58:32 +0000 (08:58 -0400)
committerMike Marciniszyn <mike.marciniszyn@intel.com>
Mon, 21 May 2012 12:58:32 +0000 (08:58 -0400)
Older kernels don't have the last min_dump_alloc_arg to
netlink_dump_start().

The arg removal can be disarmed with the
NEED_MIN_DUMP_ALLOC_ARG to support compilation on
SLES11SP2, which has the arg.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
include/linux/compat-3.1.h

index 9845aea..164ab6f 100644 (file)
@@ -23,6 +23,12 @@ static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst)
        return rcu_dereference_raw(dst->neighbour);
 }
 
+#ifndef NEED_MIN_DUMP_ALLOC_ARG
+#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)
+#endif
+
 #define genl_dump_check_consistent(cb, user_hdr, family)
 
 #define IFF_TX_SKB_SHARING     0x10000 /* The interface supports sharing