Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame^] | 1 | From 22f8d25567b8d64bdbab0fb0b4915b4362561d9b Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Wed, 24 Feb 2021 21:14:31 +0000 |
| 4 | Subject: [PATCH] w.c: correct musl builds |
| 5 | |
| 6 | No need to redefine UT_ stuff to something that does not exist. |
| 7 | |
| 8 | UT_ is already provided in musl but via utmp.h header, so include |
| 9 | it always. |
| 10 | |
| 11 | Upstream-Status: Submitted [https://gitlab.com/procps-ng/procps/-/merge_requests/126] |
| 12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 13 | --- |
| 14 | w.c | 9 +-------- |
| 15 | 1 file changed, 1 insertion(+), 8 deletions(-) |
| 16 | |
| 17 | diff --git a/w.c b/w.c |
| 18 | index 9d07ac9..d10639b 100644 |
| 19 | --- a/w.c |
| 20 | +++ b/w.c |
| 21 | @@ -57,9 +57,8 @@ |
| 22 | #include <unistd.h> |
| 23 | #ifdef HAVE_UTMPX_H |
| 24 | # include <utmpx.h> |
| 25 | -#else |
| 26 | -# include <utmp.h> |
| 27 | #endif |
| 28 | +#include <utmp.h> |
| 29 | #include <arpa/inet.h> |
| 30 | |
| 31 | static int ignoreuser = 0; /* for '-u' */ |
| 32 | @@ -72,12 +71,6 @@ typedef struct utmpx utmp_t; |
| 33 | typedef struct utmp utmp_t; |
| 34 | #endif |
| 35 | |
| 36 | -#if !defined(UT_HOSTSIZE) || defined(__UT_HOSTSIZE) |
| 37 | -# define UT_HOSTSIZE __UT_HOSTSIZE |
| 38 | -# define UT_LINESIZE __UT_LINESIZE |
| 39 | -# define UT_NAMESIZE __UT_NAMESIZE |
| 40 | -#endif |
| 41 | - |
| 42 | #ifdef W_SHOWFROM |
| 43 | # define FROM_STRING "on" |
| 44 | #else |