Skip to content

Commit f6ccbf7

Browse files
committed
LocalIP (Android): fix build
1 parent e6fb545 commit f6ccbf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/detection/localip/localip_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results)
187187
struct ethtool_cmd edata = { .cmd = ETHTOOL_GSET };
188188
ifr.ifr_data = (void*) &edata;
189189
if (ioctl(sockfd, SIOCETHTOOL, &ifr) == 0)
190-
iface->speed = (int32_t) ethtool_cmd_speed(&edata);
190+
iface->speed = (edata.speed_hi << 16) | edata.speed; // ethtool_cmd_speed is not available on Android
191191
#elif __FreeBSD__ || __APPLE__
192192
struct ifmediareq ifmr = {};
193193
strncpy(ifmr.ifm_name, iface->name.chars, IFNAMSIZ - 1);

0 commit comments

Comments
 (0)