1 #ifndef __LINUX_SLAB_WRAPPER_H
2 #define __LINUX_SLAB_WRAPPER_H 1
4 #include_next <linux/slab.h>
7 extern void *kmemdup(const void *src, size_t len, gfp_t gfp);
10 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
11 #define kmem_cache_create(n, s, a, f, c) kmem_cache_create(n, s, a, f, c, NULL)
14 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
15 static inline void *rpl_kzalloc(size_t size, gfp_t flags)
17 return kzalloc(size, flags & ~__GFP_ZERO);
19 #define kzalloc rpl_kzalloc
21 static inline void *rpl_kmalloc(size_t size, gfp_t flags)
23 if (flags & __GFP_ZERO)
24 return kzalloc(size, flags);
26 return kmalloc(size, flags);
28 #define kmalloc rpl_kmalloc