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,15)
41 static inline void setup_timer(struct timer_list * timer,
42 void (*function)(unsigned long),
45 timer->function = function;
51 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
52 #define round_jiffies(j) (j)
55 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
56 #define dev_get_by_index(ns, ifindex) dev_get_by_index(ifindex)
57 #define __dev_get_by_index(ns, ifindex) __dev_get_by_index(ifindex)
60 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
61 #include <linux/hrtimer.h>
62 static inline int hrtimer_callback_running(struct hrtimer *timer)
64 return timer->state & HRTIMER_STATE_CALLBACK;