1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 02:05:16 +03:00
aports/community/procps-compat/musl-fixes.patch
psykose 781a465d3d community/procps-compat: rename from procps
to not have naming conflicts
2023-02-25 16:50:12 +01:00

41 lines
1.2 KiB
Diff

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"