fix compile w/ modern msvc
This commit is contained in:
parent
0bcc6f416e
commit
fc9fdb3941
@ -2054,9 +2054,14 @@ static int sigar_get_netif_ipaddr(sigar_t *sigar,
|
|||||||
|
|
||||||
for (i=0; i<mib->dwNumEntries; i++) {
|
for (i=0; i<mib->dwNumEntries; i++) {
|
||||||
MIB_IPADDRROW *row = &mib->table[i];
|
MIB_IPADDRROW *row = &mib->table[i];
|
||||||
|
short type;
|
||||||
|
|
||||||
/* unused2 == wType */
|
#if _MSC_VER <= 1200
|
||||||
if (!(row->unused2 & MIB_IPADDR_PRIMARY)) {
|
type = row->unused2;
|
||||||
|
#else
|
||||||
|
type = row->wType;
|
||||||
|
#endif
|
||||||
|
if (!(type & MIB_IPADDR_PRIMARY)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user