Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-106

my_gethwaddr() does not compile on Solaris 11

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 5.5.20, 5.3.4, 5.2.11
    • Component/s: None
    • 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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            wlad Vladislav Vaintroub added a comment -

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

            Show
            wlad Vladislav Vaintroub added a comment - A possible fix could be to replace #ifdef SIOCGIFHWADDR with #fdef _ linux _

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                wlad Vladislav Vaintroub
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h