fix: SIOCGIFMTU passes int* instead of ifreq* (Android)
This commit is contained in:
@@ -1207,7 +1207,9 @@ PIEthernet::InterfaceList PIEthernet::interfaces() {
|
||||
if (ioctl(s, SIOCGIFHWADDR, &ir) == 0) ci.mac = macFromBytes(PIByteArray(ir.ifr_hwaddr.sa_data, 6));
|
||||
if (ioctl(s, SIOCGIFADDR, &ir) >= 0) ci.address = getSockAddr(&ir.ifr_addr);
|
||||
if (ioctl(s, SIOCGIFNETMASK, &ir) >= 0) ci.netmask = getSockAddr(&ir.ifr_netmask);
|
||||
ioctl(s, SIOCGIFMTU, &ci.mtu);
|
||||
if (ioctl(s, SIOCGIFMTU, &ir) == 0) {
|
||||
ci.mtu = ir.ifr_mtu;
|
||||
}
|
||||
if (ci.address == "127.0.0.1") ci.flags |= PIEthernet::ifLoopback;
|
||||
il << ci;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user