diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index 887e6daac9d2..8f857418a5eb 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -85,6 +85,7 @@ #include #include #include +#include #include #include #include @@ -431,16 +432,16 @@ set80211chanlist(const char *val, int d, int s, const struct afswtch *rafp) switch (sscanf(cp, "%u-%u", &first, &last)) { case 1: if (first > MAXCHAN) - errx(-1, "channel %u out of range, max %u", + errx(-1, "channel %u out of range, max %zu", first, MAXCHAN); setbit(chanlist.ic_channels, first); break; case 2: if (first > MAXCHAN) - errx(-1, "channel %u out of range, max %u", + errx(-1, "channel %u out of range, max %zu", first, MAXCHAN); if (last > MAXCHAN) - errx(-1, "channel %u out of range, max %u", + errx(-1, "channel %u out of range, max %zu", last, MAXCHAN); if (first > last) errx(-1, "void channel range, %u > %u", @@ -688,7 +689,7 @@ printie(const char* tag, const uint8_t *ie, size_t ielen, int maxlen) * to hexadecimal. If the result is truncated then replace the last * three characters with "...". */ -static size_t +static int copy_essid(char buf[], size_t bufsize, const u_int8_t *essid, size_t essid_len) { const u_int8_t *p; @@ -1263,10 +1264,10 @@ printkey(const struct ieee80211req_key *ik) printf(">"); if (ik->ik_type != IEEE80211_CIPHER_WEP && (ik->ik_keyrsc != 0 || verbose)) - printf(" rsc %llu", ik->ik_keyrsc); + printf(" rsc %ju", (uintmax_t)ik->ik_keyrsc); if (ik->ik_type != IEEE80211_CIPHER_WEP && (ik->ik_keytsc != 0 || verbose)) - printf(" tsc %llu", ik->ik_keytsc); + printf(" tsc %ju", (uintmax_t)ik->ik_keytsc); if (ik->ik_flags != 0 && verbose) { const char *sep = " ";