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 <fbl@redhat.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
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/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],
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],
#include_next <linux/in.h>
#include <linux/module.h>
#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) {
static inline int proto_ports_offset(int proto)
{
switch (proto) {