summaryrefslogtreecommitdiff
path: root/system/procps/use-utmpx.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/procps/use-utmpx.patch')
-rw-r--r--system/procps/use-utmpx.patch38
1 files changed, 0 insertions, 38 deletions
diff --git a/system/procps/use-utmpx.patch b/system/procps/use-utmpx.patch
deleted file mode 100644
index 608ea6182..000000000
--- a/system/procps/use-utmpx.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -ur a/proc/whattime.c b/proc/whattime.c
---- a/proc/whattime.c 2022-05-04 07:08:11.390000000 +0000
-+++ b/proc/whattime.c 2022-05-04 07:08:42.860000000 +0000
-@@ -33,7 +33,7 @@
- #include <fcntl.h>
- #include <unistd.h>
- #include <time.h>
--#include <utmp.h>
-+#include <utmpx.h>
- #include <sys/ioctl.h>
- #include "whattime.h"
- #include "sysinfo.h"
-@@ -42,7 +43,7 @@
- static double av[3];
-
- char *sprint_uptime(int human_readable) {
-- struct utmp *utmpstruct;
-+ struct utmpx *utmpstruct;
- int upminutes, uphours, updays, upweeks, upyears, updecades;
- int pos;
- int comma;
-@@ -98,13 +99,13 @@
- /* count the number of users */
-
- numuser = 0;
-- setutent();
-- while ((utmpstruct = getutent())) {
-+ setutxent();
-+ while ((utmpstruct = getutxent())) {
- if ((utmpstruct->ut_type == USER_PROCESS) &&
- (utmpstruct->ut_name[0] != '\0'))
- numuser++;
- }
-- endutent();
-+ endutxent();
-
- pos += sprintf(buf + pos, "%2d user%s, ", numuser, numuser == 1 ? "" : "s");
-