]> git.sur5r.net Git - i3/i3status/commitdiff
print_wireless_info: fix FTBFS on hurd and kfreebsd
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 22 Aug 2016 06:48:55 +0000 (08:48 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 22 Aug 2016 06:49:19 +0000 (08:49 +0200)
Patch by Axel Beckert.

src/print_wireless_info.c

index 14879ebf7cbccb5b077e040c52afb5b309f765e4..15ac694b3dc1fd7d065cfcd2adc49db375b3d3da 100644 (file)
@@ -75,7 +75,9 @@
 
 typedef struct {
     int flags;
+#ifdef IW_ESSID_MAX_SIZE
     char essid[IW_ESSID_MAX_SIZE + 1];
+#endif
 #ifdef LINUX
     uint8_t bssid[ETH_ALEN];
 #endif
@@ -529,9 +531,11 @@ void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface,
         }
 
         if (BEGINS_WITH(walk + 1, "essid")) {
+#ifdef IW_ESSID_MAX_SIZE
             if (info.flags & WIRELESS_INFO_FLAG_HAS_ESSID)
                 maybe_escape_markup(info.essid, &outwalk);
             else
+#endif
                 *(outwalk++) = '?';
             walk += strlen("essid");
         }