From 7823ad8b99ba77e92439419e78d1de7c305cb6c8 Mon Sep 17 00:00:00 2001 From: Mike Marciniszyn Date: Mon, 21 May 2012 08:55:15 -0400 Subject: [PATCH] compat: move <= 3.0 neighbour routines to compat-3.1.h This patch removes the include/net/dst.h in favor of moving the routines into compat-3.1.h. This fixes a compilation issue with the 3.2.0 kernel with the linux-3.2 repo. Signed-off-by: Mike Marciniszyn --- include/linux/compat-3.1.h | 16 ++++++++++++++++ include/net/dst.h | 27 --------------------------- 2 files changed, 16 insertions(+), 27 deletions(-) delete mode 100644 include/net/dst.h diff --git a/include/linux/compat-3.1.h b/include/linux/compat-3.1.h index 5b00ac9..9845aea 100644 --- a/include/linux/compat-3.1.h +++ b/include/linux/compat-3.1.h @@ -6,6 +6,22 @@ #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) #include +#include + +static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst) +{ + return dst->neighbour; +} + +static inline void dst_set_neighbour(struct dst_entry *dst, struct neighbour *neigh) +{ + dst->neighbour = neigh; +} + +static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst) +{ + return rcu_dereference_raw(dst->neighbour); +} #define genl_dump_check_consistent(cb, user_hdr, family) diff --git a/include/net/dst.h b/include/net/dst.h deleted file mode 100644 index 08e0a8b..0000000 --- a/include/net/dst.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _COMPAT_NET_DST_H -#define _COMPAT_NET_DST_H 1 - -#include - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)) -#include_next -#else /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,0,0)) */ -#include_next - -static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst) -{ - return dst->neighbour; -} - -static inline void dst_set_neighbour(struct dst_entry *dst, struct neighbour *neigh) -{ - dst->neighbour = neigh; -} - -static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst) -{ - return rcu_dereference_raw(dst->neighbour); -} -#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,0,0)) */ - -#endif /* _COMPAT_NET_DST_H */ -- 2.41.0