summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTommie Gannert <tommie@gannert.se>2016-08-01 11:29:18 +0100
committerTommie Gannert <tommie@gannert.se>2016-08-14 11:52:27 +0100
commit4189824ffb6b8090f36e40b1d7939764ea834540 (patch)
tree62a74cd90f1962df0e58a11096ad20e7326adc73 /src
parent712c5b0f0b64b62b7c0395acd6b295361f741735 (diff)
Define IW_ESSID_MAX_SIZE for OpenBSD.
Also fixes a signedness warning.
Diffstat (limited to 'src')
-rw-r--r--src/print_wireless_info.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c
index 25e167f..70dbdb4 100644
--- a/src/print_wireless_info.c
+++ b/src/print_wireless_info.c
@@ -54,6 +54,7 @@
#include <netinet/if_ether.h>
#include <net80211/ieee80211.h>
#include <net80211/ieee80211_ioctl.h>
+#define IW_ESSID_MAX_SIZE IEEE80211_NWID_LEN
#endif
#include "i3status.h"
@@ -423,7 +424,7 @@ error1:
else
len = IEEE80211_NWID_LEN + 1;
- strncpy(&info->essid[0], nwid.i_nwid, len);
+ strncpy(&info->essid[0], (char *)nwid.i_nwid, len);
info->essid[IW_ESSID_MAX_SIZE] = '\0';
info->flags |= WIRELESS_INFO_FLAG_HAS_ESSID;
}