Commit 15f20663 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Cherry-picked fix for solaris compilation from 5.2

parent 657e8675
......@@ -100,14 +100,14 @@ my_bool my_gethwaddr(uchar *to)
uint i;
for (i= 0; res && i < ifc.ifc_len / sizeof(ifr[0]); i++)
{
#ifdef SIOCGIFHWADDR
#ifdef __linux__
if (ioctl(fd, SIOCGIFHWADDR, &ifr[i]) >= 0)
res= memcpy_and_test(to, (uchar *)&ifr[i].ifr_hwaddr.sa_data,
ETHER_ADDR_LEN);
#else
/*
A bug in OpenSolaris prevents non-root from getting a mac address:
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4720634
A bug in OpenSolaris used to prevent non-root from getting a mac address:
{no url. Oracle killed the old OpenSolaris bug database}
Thus, we'll use an alternative method and extract the address from the
arp table.
......
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