summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2011-10-27 15:22:52 +0300
committerunknown <sanja@askmonty.org>2011-10-27 15:22:52 +0300
commit28e2777991b238d770529d0438e4f18fbfc3e271 (patch)
tree38f9c8b2a404dca974887089cfb67e492ee68e77 /mysys
parent78eb1d48c91f260cab3f616d8a9a8de8040d2347 (diff)
downloadmariadb-git-28e2777991b238d770529d0438e4f18fbfc3e271.tar.gz
Fix gcc 4.6 warnings about assigned but not used variables.
Fixed my_gethwaddr.c to allow compilation on Mac OS X.
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 d02ba822f73..e8e8c15bca1 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);
}
}