/* See LICENSE file for copyright and license details. */
+#if defined(__linux__)
#include <err.h>
#include <ifaddrs.h>
#include <linux/wireless.h>
wreq.u.essid.pointer = id;
if (ioctl(sockfd,SIOCGIWESSID, &wreq) == -1) {
warn("Failed to get ESSID for interface %s", iface);
+ close(sockfd);
return NULL;
}
else
return id;
}
+#endif