On newer kernels const pointers can be passed to vfree()
and vunmap(), doing so on old kernels causes warnings
that we can suppress with a cast.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
#include_next <linux/vmalloc.h>
#include <linux/version.h>
+/* avoid warnings due to b3bdda02aa547a0753b4fdbc105e86ef9046b30b */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+#define vfree(ptr) vfree((void *)(ptr))
+#define vunmap(ptr) vunmap((void *)(ptr))
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
#define vzalloc LINUX_BACKPORT(vzalloc)
extern void *vzalloc(unsigned long size);