Commit d8045b5e authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[2246] Another Solaris 11 compilation fix

parent 113fef86
...@@ -54,14 +54,14 @@ IfaceMgr::detectIfaces() { ...@@ -54,14 +54,14 @@ IfaceMgr::detectIfaces() {
const char * ifname = ifptr->ifa_name; const char * ifname = ifptr->ifa_name;
uint ifindex = 0; uint ifindex = 0;
if(!(ifindex = if_nametoindex(ifname))) { if (!(ifindex = if_nametoindex(ifname))) {
// Interface name does not have corresponding index ... // Interface name does not have corresponding index ...
freeifaddrs(iflist); freeifaddrs(iflist);
isc_throw(Unexpected, "Interface " << ifname << " has no index"); isc_throw(Unexpected, "Interface " << ifname << " has no index");
} }
iface_iter = ifaces.find(ifname); iface_iter = ifaces.find(ifname);
if(iface_iter != ifaceLst.end()) { if (iface_iter != ifaces.end()) {
continue; continue;
} }
...@@ -79,7 +79,7 @@ IfaceMgr::detectIfaces() { ...@@ -79,7 +79,7 @@ IfaceMgr::detectIfaces() {
} }
// Common byte pointer for following data // Common byte pointer for following data
const uint8_t * ptr = 0; const uint8_t * ptr = 0;
if(ifptr->ifa_addr->sa_family == AF_LINK) { if (ifptr->ifa_addr->sa_family == AF_LINK) {
// HWAddr // HWAddr
struct sockaddr_dl * ldata = struct sockaddr_dl * ldata =
reinterpret_cast<struct sockaddr_dl *>(ifptr->ifa_addr); reinterpret_cast<struct sockaddr_dl *>(ifptr->ifa_addr);
...@@ -87,7 +87,7 @@ IfaceMgr::detectIfaces() { ...@@ -87,7 +87,7 @@ IfaceMgr::detectIfaces() {
iface_iter->second.setHWType(ldata->sdl_type); iface_iter->second.setHWType(ldata->sdl_type);
iface_iter->second.setMac(ptr, ldata->sdl_alen); iface_iter->second.setMac(ptr, ldata->sdl_alen);
} else if(ifptr->ifa_addr->sa_family == AF_INET6) { } else if (ifptr->ifa_addr->sa_family == AF_INET6) {
// IPv6 Addr // IPv6 Addr
struct sockaddr_in6 * adata = struct sockaddr_in6 * adata =
reinterpret_cast<struct sockaddr_in6 *>(ifptr->ifa_addr); reinterpret_cast<struct sockaddr_in6 *>(ifptr->ifa_addr);
......
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