Initial import
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / compat26.h
1 #ifndef __COMPAT26_H
2 #define __COMPAT26_H 1
3
4 #include <linux/version.h>
5
6 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
7 /*----------------------------------------------------------------------------
8  * In 2.6.24, a namespace argument became required for dev_get_by_name. */
9 #define net_init NULL
10
11 #define dev_get_by_name(net, name) \
12                 dev_get_by_name((name))
13
14 #endif /* linux kernel <= 2.6.23 */
15
16
17 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)
18 /*----------------------------------------------------------------------------
19  * In 2.6.23, the last argument was dropped from kmem_cache_create. */
20 #define kmem_cache_create(n, s, a, f, c) \
21                 kmem_cache_create((n), (s), (a), (f), (c), NULL)
22
23 #endif /* linux kernel <= 2.6.22 */
24
25 #endif /* compat26.h */