Red Hat Enterprise Linux 6 has backported it from upstream,
so check for proto_ports_offset instead of kernel version.

Signed-off-by: Flavio Leitner <f...@redhat.com>
---
 acinclude.m4                             | 1 +
 datapath/linux/compat/include/linux/in.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/acinclude.m4 b/acinclude.m4
index db0de0d..5e34d92 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -324,6 +324,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [vlan_set_encap_proto])
 
   OVS_GREP_IFELSE([$KSRC/include/linux/in.h], [ipv4_is_multicast])
+  OVS_GREP_IFELSE([$KSRC/include/linux/in.h], [proto_ports_offset])
   OVS_GREP_IFELSE([$KSRC/include/net/ip.h], [__ip_select_ident.*dst_entry],
                   [OVS_DEFINE([HAVE_IP_SELECT_IDENT_USING_DST_ENTRY])])
   OVS_GREP_IFELSE([$KSRC/include/net/ip.h], [inet_get_local_port_range.*net],
diff --git a/datapath/linux/compat/include/linux/in.h 
b/datapath/linux/compat/include/linux/in.h
index fa2e026..78f8d77 100644
--- a/datapath/linux/compat/include/linux/in.h
+++ b/datapath/linux/compat/include/linux/in.h
@@ -4,7 +4,7 @@
 #include_next <linux/in.h>
 
 #include <linux/module.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+#ifndef HAVE_PROTO_PORTS_OFFSET
 static inline int proto_ports_offset(int proto)
 {
        switch (proto) {
-- 
2.1.0

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to