summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_gethwaddr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mysys/my_gethwaddr.c b/mysys/my_gethwaddr.c
index bcc231eaf7e..391e652d406 100644
--- a/mysys/my_gethwaddr.c
+++ b/mysys/my_gethwaddr.c
@@ -32,8 +32,7 @@ static my_bool memcpy_and_test(uchar *to, uchar *from, uint len)
return res;
}
-#ifdef __FreeBSD__
-
+#if defined(__APPLE__) || defined(__FreeBSD__)
#include <net/ethernet.h>
#include <sys/sysctl.h>
#include <net/route.h>
@@ -63,7 +62,7 @@ my_bool my_gethwaddr(uchar *to)
if (ifm->ifm_type == RTM_IFINFO)
{
sdl = (struct sockaddr_dl *)(ifm + 1);
- addr= LLADDR(sdl);
+ addr= (uchar *)LLADDR(sdl);
res= memcpy_and_test(to, addr, ETHER_ADDR_LEN);
}
}