]> git.sur5r.net Git - i3/i3status/commitdiff
Define IW_ESSID_MAX_SIZE for OpenBSD.
authorTommie Gannert <tommie@gannert.se>
Mon, 1 Aug 2016 10:29:18 +0000 (11:29 +0100)
committerTommie Gannert <tommie@gannert.se>
Sun, 14 Aug 2016 10:52:27 +0000 (11:52 +0100)
Also fixes a signedness warning.

src/print_wireless_info.c

index 25e167fc07a6df9ed1d32be288ad08920c7d4f00..70dbdb450861417daf4e3ff873c532b95787f3a9 100644 (file)
@@ -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;
     }