X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/d2988c72e3e77e188fda0176ce4969322e69fae9..e79d4932ea413c277425ff92c456741e0730c3d6:/components/wifi.c diff --git a/components/wifi.c b/components/wifi.c index 9ecb8e1..a02c277 100644 --- a/components/wifi.c +++ b/components/wifi.c @@ -1,4 +1,5 @@ /* See LICENSE file for copyright and license details. */ +#if defined(__linux__) #include #include #include @@ -77,6 +78,7 @@ wifi_essid(const char *iface) wreq.u.essid.pointer = id; if (ioctl(sockfd,SIOCGIWESSID, &wreq) == -1) { warn("Failed to get ESSID for interface %s", iface); + close(sockfd); return NULL; } @@ -87,3 +89,4 @@ wifi_essid(const char *iface) else return id; } +#endif