From 420a2e019f6a32ef5bff16a71eb8ec2064844d06 Mon Sep 17 00:00:00 2001 From: tmm Date: Sat, 26 May 2001 00:02:13 +0000 Subject: Fix the error buffer passed to kvm_openfiles to have a correct length of _POSIX2_LINE_MAX. MFC after: 1 week --- usr.bin/w/w.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin/w/w.c') diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 6ef6ad9..ef4030e 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -72,6 +72,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -141,7 +142,7 @@ main(argc, argv) time_t touched; int ch, i, nentries, nusers, wcmd, longidle, dropgid; char *memf, *nlistf, *p, *x; - char buf[MAXHOSTNAMELEN], errbuf[256]; + char buf[MAXHOSTNAMELEN], errbuf[_POSIX2_LINE_MAX]; (void)setlocale(LC_ALL, ""); use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); -- cgit v1.1