4 #include <linux/version.h>
6 #if defined(CONFIG_PREEMPT) && LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,21)
7 #error "CONFIG_PREEMPT is broken with 2.6.x before 2.6.21--see commit 4498121ca3, \"[NET]: Handle disabled preemption in gfp_any()\""
10 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
11 /*----------------------------------------------------------------------------
12 * In 2.6.24, a namespace argument became required for dev_get_by_name. */
14 #define dev_get_by_name(net, name) \
15 dev_get_by_name((name))
17 #define dev_get_by_index(net, ifindex) \
18 dev_get_by_index((ifindex))
20 #define __dev_get_by_name(net, name) \
21 __dev_get_by_name((name))
23 #define __dev_get_by_index(net, ifindex) \
24 __dev_get_by_index((ifindex))
26 #endif /* linux kernel <= 2.6.23 */
29 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)
30 /*----------------------------------------------------------------------------
31 * In 2.6.23, the last argument was dropped from kmem_cache_create. */
32 #define kmem_cache_create(n, s, a, f, c) \
33 kmem_cache_create((n), (s), (a), (f), (c), NULL)
35 #endif /* linux kernel <= 2.6.22 */
37 #endif /* compat26.h */