From a27eb3eead864baaf9648072ebfd47fb85652766 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Wed, 22 Feb 2012 12:50:32 +0200 Subject: [PATCH] compat: add net/dst.h stub for Linux 3.1 and older Signed-off-by: Vladimir Sokolovsky --- include/net/dst.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/net/dst.h diff --git a/include/net/dst.h b/include/net/dst.h new file mode 100644 index 0000000..f943fc4 --- /dev/null +++ b/include/net/dst.h @@ -0,0 +1,27 @@ +#ifndef _COMPAT_NET_DST_H +#define _COMPAT_NET_DST_H 1 + +#include + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(3,1,0)) +#include +#else /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,1,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,1,0)) */ + +#endif /* _COMPAT_NET_DST_H */ -- 2.41.0