musl-fixes.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Pulling in utmpx.h which does not have UT_HOSTSIZE, UT_LINESIZE & UT_NAMESIZE defined.
  2. Causing:
  3. w.c: In function 'print_from':
  4. w.c:236:43: error: 'UT_HOSTSIZE' undeclared (first use in this function)
  5. 236 | print_display_or_interface(u->ut_host, UT_HOSTSIZE, fromlen - len);
  6. | ^~~~~~~~~~~
  7. w.c:236:43: note: each undeclared identifier is reported only once for each function it appears in
  8. w.c: In function 'getproc':
  9. w.c:357:12: error: 'UT_NAMESIZE' undeclared (first use in this function)
  10. 357 | char buf[UT_NAMESIZE + 1];
  11. ....
  12. proc/escape.c:237:30: error: 'CODESET' undeclared (first use in this function)
  13. 237 | char *enc = nl_langinfo(CODESET);
  14. --- a/w.c
  15. +++ b/w.c
  16. @@ -55,11 +55,7 @@
  17. #include <termios.h>
  18. #include <time.h>
  19. #include <unistd.h>
  20. -#ifdef HAVE_UTMPX_H
  21. -# include <utmpx.h>
  22. -#else
  23. -# include <utmp.h>
  24. -#endif
  25. +#include <utmp.h>
  26. #include <arpa/inet.h>
  27. static int ignoreuser = 0; /* for '-u' */
  28. --- a/proc/escape.c
  29. +++ b/proc/escape.c
  30. @@ -21,6 +21,7 @@
  31. #include <sys/types.h>
  32. #include <string.h>
  33. #include <limits.h>
  34. +#include <langinfo.h>
  35. #include "procps.h"
  36. #include "escape.h"
  37. #include "readproc.h"