summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-05-14 15:44:39 -0700
committerBen Pfaff <blp@nicira.com>2010-05-17 09:35:31 -0700
commit85444c3f79f594c838d4b3e72ff27e263514f194 (patch)
tree43d420f3e19bebdb9a2e22c45e5025f89dbc3c91
parent4aa13c0c348cf78d28095196139489392eae1c67 (diff)
downloadopenvswitch-85444c3f79f594c838d4b3e72ff27e263514f194.tar.gz
datapath: Fix build with backported skb_dst().
An upcoming backport adds skb_dst() to a pre-2.6.31 Linux kernel, so we have to check for the presence of an skb_dst() definition instead of for the particular kernel version.
-rw-r--r--acinclude.m42
-rw-r--r--datapath/linux-2.6/compat-2.6/include/linux/skbuff.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 70498a995..8643cf7b6 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -160,6 +160,8 @@ AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [
[OVS_DEFINE([HAVE_PROTO_DATA_VALID])])
OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [raw],
[OVS_DEFINE([HAVE_MAC_RAW])])
+ OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_dst(],
+ [OVS_DEFINE([HAVE_SKB_DST_ACCESSOR_FUNCS])])
OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h],
[skb_copy_from_linear_data_offset],
[OVS_DEFINE([HAVE_SKB_COPY_FROM_LINEAR_DATA_OFFSET])])
diff --git a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h
index e8dc72ecd..5ed0e48ff 100644
--- a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h
+++ b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h
@@ -83,7 +83,7 @@ static inline int skb_clone_writable(struct sk_buff *skb, int len)
}
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+#ifndef HAVE_SKB_DST_ACCESSOR_FUNCS
static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
{
return (struct dst_entry *)skb->dst;