Compatibility fixes for CentOS 5.2

This commit is contained in:
Glen Gibb committed 2008-09-23 12:53:32 -07:00
1 parent 3a4778684b
commit 0c3ebf64e5
5 files changed
+17 -4

No files matched your search

@@ -4,7 +4,8 @@
#include_next <linux/ip.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)) && \
(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5,2)))
#ifdef __KERNEL__
#include <linux/skbuff.h>
@@ -6,7 +6,7 @@
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
/* Emulate Linux 2.6.17 and later behavior, in which kfree_skb silently ignores
/* Emulate Linux 2.6.17 and later behavior, in which kfree_skb silently ignores
* null pointer arguments. */
#define kfree_skb(skb) kfree_skb_maybe_null(skb)
static inline void kfree_skb_maybe_null(struct sk_buff *skb)
@@ -20,6 +20,7 @@ static inline void kfree_skb_maybe_null(struct sk_buff *skb)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
/* Note that CHECKSUM_PARTIAL is not implemented, but this allows us to at
* least test against it: see update_csum() in forward.c. */
#undef CHECKSUM_PARTIAL
#define CHECKSUM_PARTIAL 3
#define CHECKSUM_COMPLETE CHECKSUM_HW
#endif /* linux kernel < 2.6.19 */
@@ -30,6 +31,8 @@ static inline void kfree_skb_maybe_null(struct sk_buff *skb)
#define mac_header mac.raw
#define network_header nh.raw
#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5,2)
static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
{
return skb->h.raw;
@@ -70,6 +73,8 @@ static inline int skb_transport_offset(const struct sk_buff *skb)
{
return skb_transport_header(skb) - skb->data;
}
#endif /* rhel version < 5.2 */
#endif /* linux kernel < 2.6.22 */
#endif
@@ -4,7 +4,8 @@
#include_next <linux/tcp.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)) && \
(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5,2)))
#ifdef __KERNEL__
static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
@@ -4,7 +4,8 @@
#include_next <linux/udp.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)) && \
(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5,2)))
#ifdef __KERNEL__
static inline struct udphdr *udp_hdr(const struct sk_buff *skb)