NLMSG_DEFAULT_SIZE was introduced in 2.6.20-rc1 in commit
339bf98ff,
"[NETLINK]: Do precise netlink message allocations where possible", but
we only defined it for kernels 2.6.18 and earlier. This change fixes
up the discrepancy.
#include <net/netlink.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+#ifndef NLMSG_DEFAULT_SIZE
#define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN)
+#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
#define nlmsg_new(s, f) nlmsg_new_proper((s), (f))
static inline struct sk_buff *nlmsg_new_proper(int size, gfp_t flags)
{