diff options
Diffstat (limited to 'lib/libstand')
-rw-r--r-- | lib/libstand/printf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libstand/printf.c b/lib/libstand/printf.c index 6afcbfd..5f1bedc 100644 --- a/lib/libstand/printf.c +++ b/lib/libstand/printf.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); */ #include <sys/types.h> +#include <limits.h> #include <string.h> #include "stand.h" @@ -109,7 +110,7 @@ ksprintn(ul, base, lenp) u_long ul; int base, *lenp; { /* A long in base 8, plus NULL. */ - static char buf[sizeof(long) * NBBY / 3 + 2]; + static char buf[sizeof(long) * CHAR_BIT / 3 + 2]; char *p; p = buf; |