[MDEV-106] my_gethwaddr() does not compile on Solaris 11 Created: 2012-01-22  Updated: 2012-01-23  Resolved: 2012-01-23

Status: Closed
Project: MariaDB Server
Component/s: None
Fix Version/s: 5.5.20, 5.3.4, 5.2.11

Type: Task Priority: Major
Reporter: Vladislav Vaintroub Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

compiler complains that struct ifreq does not contain member ifr_hwaddr.
SIOCGIFHWADDR is defined in sockio.h, and the below code fails to compile.

#ifdef SIOCGIFHWADDR
if (ioctl(fd, SIOCGIFHWADDR, &ifr[i]) >= 0)
res= memcpy_and_test(to, (uchar *)&ifr[i].ifr_hwaddr.sa_data,
ETHER_ADDR_LEN);
#else

I can reproduce the compile error with both Solaris 11 Express and non-express editions installed in a VM, I do not have a clue how this could work on buildbot.



 Comments   
Comment by Vladislav Vaintroub [ 2012-01-22 ]

A possible fix could be to replace #ifdef SIOCGIFHWADDR with #fdef _linux_

Generated at Thu Feb 08 06:26:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.