diff options
author | Vladislav Vaintroub <wlad@montyprogram.org> | 2012-02-02 21:50:03 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.org> | 2012-02-02 21:50:03 +0100 |
commit | 15f20663dbc9de85f5aee1ce753619bc4a9aed52 (patch) | |
tree | 1be124f8c58f33e28b69eed822aefee6aee5118d /mysys/my_gethwaddr.c | |
parent | 657e8675d8a6d56a7e797bc8b07da1feb836450b (diff) | |
download | mariadb-git-15f20663dbc9de85f5aee1ce753619bc4a9aed52.tar.gz |
Cherry-picked fix for solaris compilation from 5.2
Diffstat (limited to 'mysys/my_gethwaddr.c')
-rw-r--r-- | mysys/my_gethwaddr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mysys/my_gethwaddr.c b/mysys/my_gethwaddr.c index b01b109c666..74dae29f235 100644 --- a/mysys/my_gethwaddr.c +++ b/mysys/my_gethwaddr.c @@ -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. |