diff options
Diffstat (limited to 'system/procps/utmpx.patch')
-rw-r--r-- | system/procps/utmpx.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/system/procps/utmpx.patch b/system/procps/utmpx.patch new file mode 100644 index 000000000..c4af55ede --- /dev/null +++ b/system/procps/utmpx.patch @@ -0,0 +1,44 @@ +--- procps-v4.0.5/library/uptime.c.old 2024-12-18 18:41:10.000000000 -0600 ++++ procps-v4.0.5/library/uptime.c 2025-06-16 03:14:07.898014940 -0500 +@@ -30,7 +30,11 @@ + #include <string.h> + #include <time.h> + #include <unistd.h> ++#ifdef HAVE_UTMPX_H ++#include <utmpx.h> ++#else + #include <utmp.h> ++#endif + #ifdef WITH_SYSTEMD + #include <systemd/sd-daemon.h> + #include <systemd/sd-login.h> +@@ -63,7 +67,7 @@ + PROCPS_EXPORT int procps_users(void) + { + int numuser = 0; +-#ifdef HAVE_UTMP_X ++#ifdef HAVE_UTMPX_H + struct utmpx *ut; + #else + struct utmp *ut; +@@ -99,7 +103,7 @@ + } + #endif + +-#ifdef HAVE_UTMP_X ++#ifdef HAVE_UTMPX_H + setutxent(); + while ((ut = getutxent())) { + #else +@@ -109,7 +113,11 @@ + if ((ut->ut_type == USER_PROCESS) && (ut->ut_name[0] != '\0')) + numuser++; + } ++#ifdef HAVE_UTMPX_H ++ endutxent(); ++#else + endutent(); ++#endif + + return numuser; + } |