datapath: Check for backported __wsum and __sum16.
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / linux / kernel.h
1 #ifndef __KERNEL_H_WRAPPER
2 #define __KERNEL_H_WRAPPER 1
3
4 #include_next <linux/kernel.h>
5 #ifndef HAVE_LOG2_H
6 #include <linux/log2.h>
7 #endif
8
9 #include <linux/version.h>
10 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
11 #undef pr_emerg
12 #define pr_emerg(fmt, ...) \
13         printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
14 #undef pr_alert
15 #define pr_alert(fmt, ...) \
16         printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
17 #undef pr_crit
18 #define pr_crit(fmt, ...) \
19         printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
20 #undef pr_err
21 #define pr_err(fmt, ...) \
22         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
23 #undef pr_warning
24 #define pr_warning(fmt, ...) \
25         printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
26 #undef pr_notice
27 #define pr_notice(fmt, ...) \
28         printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
29 #undef pr_info
30 #define pr_info(fmt, ...) \
31         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
32 #undef pr_cont
33 #define pr_cont(fmt, ...) \
34         printk(KERN_CONT fmt, ##__VA_ARGS__)
35 #endif
36
37 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
38 #define pr_warn pr_warning
39 #endif
40
41 #endif /* linux/kernel.h */