]> git.sur5r.net Git - i3/i3status/blobdiff - src/print_wireless_info.c
Merge pull request #290 from duskCoder/changes
[i3/i3status] / src / print_wireless_info.c
index d229538d7586f7a86b810a05df3032b23b3bfbe5..efdd59b777907953403d1418fe49d1ebcd59bc9b 100644 (file)
@@ -16,6 +16,7 @@
 #endif
 
 #ifdef __APPLE__
+#include <sys/socket.h>
 #define IW_ESSID_MAX_SIZE 32
 #endif
 
@@ -489,7 +490,10 @@ void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface,
     char *ipv4_address = sstrdup(get_ip_addr(interface, AF_INET));
     char *ipv6_address = sstrdup(get_ip_addr(interface, AF_INET6));
 
-    // Removing '%' and following characters from IPv6
+    /*
+     * Removing '%' and following characters from IPv6 since the interface identifier is redundant,
+     * as the output already includes the interface name.
+    */
     if (ipv6_address != NULL) {
         char *prct_ptr = strstr(ipv6_address, "%");
         if (prct_ptr != NULL) {