Commit 9f79d2f9 authored by unknown's avatar unknown

Fix of building on Mac OS.

parent 4720b6f6
...@@ -32,8 +32,7 @@ static my_bool memcpy_and_test(uchar *to, uchar *from, uint len) ...@@ -32,8 +32,7 @@ static my_bool memcpy_and_test(uchar *to, uchar *from, uint len)
return res; return res;
} }
#ifdef __FreeBSD__ #if defined(__APPLE__) || defined(__FreeBSD__)
#include <net/ethernet.h> #include <net/ethernet.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <net/route.h> #include <net/route.h>
...@@ -63,7 +62,7 @@ my_bool my_gethwaddr(uchar *to) ...@@ -63,7 +62,7 @@ my_bool my_gethwaddr(uchar *to)
if (ifm->ifm_type == RTM_IFINFO) if (ifm->ifm_type == RTM_IFINFO)
{ {
sdl = (struct sockaddr_dl *)(ifm + 1); sdl = (struct sockaddr_dl *)(ifm + 1);
addr= LLADDR(sdl); addr= (uchar *)LLADDR(sdl);
res= memcpy_and_test(to, addr, ETHER_ADDR_LEN); res= memcpy_and_test(to, addr, ETHER_ADDR_LEN);
} }
} }
......
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