If kfree/vfree is called where free is a already variable name, code will not compile. Also both take a const* in Linux kernel code. Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxxxxxxxx> --- include/linux/barebox-wrapper.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/linux/barebox-wrapper.h b/include/linux/barebox-wrapper.h index fc1b5c2..67b332e 100644 --- a/include/linux/barebox-wrapper.h +++ b/include/linux/barebox-wrapper.h @@ -1,14 +1,21 @@ #ifndef __INCLUDE_LINUX_BAREBOX_WRAPPER_H #define __INCLUDE_LINUX_BAREBOX_WRAPPER_H +#include <malloc.h> #include <xfuncs.h> #define kmalloc(len, mode) malloc(len) #define kzalloc(len, mode) xzalloc(len) #define vmalloc(len) malloc(len) -#define kfree(ptr) free(ptr) +static inline void kfree(const void *block) +{ + free((void *)block); +} #define vzalloc(len) kzalloc(len, 0) -#define vfree(ptr) free(ptr) +static inline void vfree(const void *addr) +{ + free((void *)addr); +} #define KERN_EMERG "" /* system is unusable */ #define KERN_ALERT "" /* action must be taken immediately */ -- 2.7.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox