blob: c92ad28e4f50d092655154309bd255b5cd625864 [file] [log] [blame]
Andrew Geissler95ac1b82021-03-31 14:34:31 -05001From 22f8d25567b8d64bdbab0fb0b4915b4362561d9b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 24 Feb 2021 21:14:31 +0000
4Subject: [PATCH] w.c: correct musl builds
5
6No need to redefine UT_ stuff to something that does not exist.
7
8UT_ is already provided in musl but via utmp.h header, so include
9it always.
10
11Upstream-Status: Submitted [https://gitlab.com/procps-ng/procps/-/merge_requests/126]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 w.c | 9 +--------
15 1 file changed, 1 insertion(+), 8 deletions(-)
16
17diff --git a/w.c b/w.c
18index 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