summaryrefslogtreecommitdiff
path: root/src/print_wireless_info.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2016-08-22 08:48:55 +0200
committerMichael Stapelberg <michael@stapelberg.de>2016-08-22 08:49:19 +0200
commitef16acfca5f41fc841d7cc0ec8cca1d950157f6a (patch)
treed94e9f71eb1c02c9ef397a435cc182ee1357629b /src/print_wireless_info.c
parenta2fd4bd07424a1df80c5ee7bc9f958e4ab6bafcd (diff)
print_wireless_info: fix FTBFS on hurd and kfreebsd
Patch by Axel Beckert.
Diffstat (limited to 'src/print_wireless_info.c')
-rw-r--r--src/print_wireless_info.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c
index 14879eb..15ac694 100644
--- a/src/print_wireless_info.c
+++ b/src/print_wireless_info.c
@@ -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");
}