16 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
17 static inline void *kzalloc(size_t size, unsigned int __nocast flags)
19 void *ret = kmalloc(size, flags);
25 static inline void skb_get_timestamp(const struct sk_buff *skb,
26 struct timeval *stamp)
28 stamp->tv_sec = skb->stamp.tv_sec;
29 stamp->tv_usec = skb->stamp.tv_usec;
32 static inline void skb_set_timestamp(struct sk_buff *skb,
33 const struct timeval *stamp)
35 skb->stamp.tv_sec = stamp->tv_sec;
36 skb->stamp.tv_usec = stamp->tv_usec;
40 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
41 #define round_jiffies(j) (j)
44 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
45 #define dev_get_by_index(ns, ifindex) dev_get_by_index(ifindex)
46 #define __dev_get_by_index(ns, ifindex) __dev_get_by_index(ifindex)
49 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
50 #include <linux/hrtimer.h>
51 static inline int hrtimer_callback_running(struct hrtimer *timer)
53 return timer->state & HRTIMER_STATE_CALLBACK;