From: Tommie Gannert Date: Mon, 1 Aug 2016 10:29:18 +0000 (+0100) Subject: Define IW_ESSID_MAX_SIZE for OpenBSD. X-Git-Tag: 2.11~25^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4189824ffb6b8090f36e40b1d7939764ea834540;p=i3%2Fi3status Define IW_ESSID_MAX_SIZE for OpenBSD. Also fixes a signedness warning. --- 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 #include #include +#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; }