VirtualBox

Changeset 29391 in vbox


Ignore:
Timestamp:
May 11, 2010 8:38:39 PM (15 years ago)
Author:
vboxsync
Message:

VBoxServiceVMInfo: Solaris build fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp

    r29390 r29391  
    458458        VBoxServicePropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", inet_ntoa(pAddress->sin_addr));
    459459
     460 #if defined(RT_OS_SOLARIS)
     461        if (ioctl(sd, SIOCGENADDR, &ifrequest[i]) < 0)
     462 #else
    460463        if (ioctl(sd, SIOCGIFHWADDR, &ifrequest[i]) < 0)
     464 #endif
    461465        {
    462466            VBoxServiceError("Failed to ioctl(SIOCGIFHWADDR) on socket: Error %d\n", errno);
     
    466470
    467471        char szMac[32];
    468         char *pu8Mac = ifrequest[i].ifr_hwaddr.sa_data;
     472 #if defined(RT_OS_SOLARIS)
     473        char *pu8Mac = &ifrequest[i].ifr_enaddr[0];
     474 #else
     475        char *pu8Mac = &ifrequest[i].ifr_hwaddr.sa_data[0];
     476 #endif
    469477        RTStrPrintf(szMac, sizeof(szMac), "%02x:%02x:%02x:%02x:%02x:%02x",
    470478                    pu8Mac[0], pu8Mac[1], pu8Mac[2], pu8Mac[3],  pu8Mac[4], pu8Mac[5]);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette