123456789101112131415161718192021222324252627282930313233343536373839404142 |
- Pulling in utmpx.h which does not have UT_HOSTSIZE, UT_LINESIZE & UT_NAMESIZE defined.
- Causing:
- w.c: In function 'print_from':
- w.c:236:43: error: 'UT_HOSTSIZE' undeclared (first use in this function)
- 236 | print_display_or_interface(u->ut_host, UT_HOSTSIZE, fromlen - len);
- | ^~~~~~~~~~~
- w.c:236:43: note: each undeclared identifier is reported only once for each function it appears in
- w.c: In function 'getproc':
- w.c:357:12: error: 'UT_NAMESIZE' undeclared (first use in this function)
- 357 | char buf[UT_NAMESIZE + 1];
- ....
- proc/escape.c:237:30: error: 'CODESET' undeclared (first use in this function)
- 237 | char *enc = nl_langinfo(CODESET);
- --- a/w.c
- +++ b/w.c
- @@ -55,11 +55,7 @@
- #include <termios.h>
- #include <time.h>
- #include <unistd.h>
- -#ifdef HAVE_UTMPX_H
- -# include <utmpx.h>
- -#else
- -# include <utmp.h>
- -#endif
- +#include <utmp.h>
- #include <arpa/inet.h>
-
- static int ignoreuser = 0; /* for '-u' */
- --- a/proc/escape.c
- +++ b/proc/escape.c
- @@ -21,6 +21,7 @@
- #include <sys/types.h>
- #include <string.h>
- #include <limits.h>
- +#include <langinfo.h>
- #include "procps.h"
- #include "escape.h"
- #include "readproc.h"
|