Commit cf5bd786 authored by Miguel Jimenez Lopez's avatar Miguel Jimenez Lopez

Fix function prototype for newer kernels.

parent 55f4d582
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/version.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
...@@ -22,8 +23,12 @@ ...@@ -22,8 +23,12 @@
static char *macaddr = "00:00:00:00:00:00"; static char *macaddr = "00:00:00:00:00:00";
module_param(macaddr, charp, 0444); module_param(macaddr, charp, 0444);
/* Copied from kernel 3.6 net/utils.c, it converts from MAC string to u8 array */ /* Copied from kernel net/utils.c, it converts from MAC string to u8 array */
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
__weak int mac_pton(const char *s, u8 *mac) __weak int mac_pton(const char *s, u8 *mac)
#else
__weak bool mac_pton(const char *s, u8 *mac)
#endif
{ {
int i; int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment