From ff9464d2ad9b6aae4310932b58a8cc246caf213d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 5 May 2008 12:08:00 -0700 Subject: [PATCH] Fix compilation on Linux 2.6.20: declare NLMSG_DEFAULT_SIZE with this kernel. 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. --- datapath/linux-2.6/compat-2.6/include/linux/netlink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datapath/linux-2.6/compat-2.6/include/linux/netlink.h b/datapath/linux-2.6/compat-2.6/include/linux/netlink.h index f1588af0..c5f83bd0 100644 --- a/datapath/linux-2.6/compat-2.6/include/linux/netlink.h +++ b/datapath/linux-2.6/compat-2.6/include/linux/netlink.h @@ -6,10 +6,12 @@ #include #include -#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) { -- 2.30.2