LocalIP: make link speed formattable

Fix #1209
This commit is contained in:
李通洲
2024-08-24 14:47:15 +08:00
parent c8d85e09d7
commit ce7ecd3863
2 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -185,7 +185,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results)
#ifdef __linux__
struct ethtool_cmd edata = { .cmd = ETHTOOL_GSET };
ifr.ifr_data = (__caddr_t) &edata;
ifr.ifr_data = (caddr_t) &edata;
if (ioctl(sockfd, SIOCETHTOOL, &ifr) == 0)
iface->speed = (int32_t) ethtool_cmd_speed(&edata);
#elif __FreeBSD__ || __APPLE__