[packages/psacct] Rel 2

arekm arekm at pld-linux.org
Wed Jun 10 10:58:01 CEST 2026


commit d43ab5dca7f47c9d4627466456670cc4e1b4f50e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Jun 10 10:57:33 2026 +0200

    Rel 2

 acct-qsort.patch | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 psacct.spec      |  4 +++-
 2 files changed, 58 insertions(+), 1 deletion(-)
---
diff --git a/psacct.spec b/psacct.spec
index 5ef9238..4078bed 100644
--- a/psacct.spec
+++ b/psacct.spec
@@ -7,7 +7,7 @@ Summary(uk.UTF-8):	Утиліти для моніторингу активнос
 Summary(ru.UTF-8):	Утилиты для мониторинга активности процессов
 Name:		psacct
 Version:	6.6.4
-Release:	1
+Release:	2
 License:	GPL v3+
 Group:		Applications/System
 Source0:	http://ftp.gnu.org/gnu/acct/acct-%{version}.tar.gz
@@ -19,6 +19,7 @@ Source3:	acct.sysinit
 Source4:	acct.sysconfig
 Patch0:		acct-info.patch
 Patch1:		%{name}-path.patch
+Patch2:		acct-qsort.patch
 URL:		http://www.gnu.org/directory/GNU/acct.html
 BuildRequires:	autoconf >= 2.63
 BuildRequires:	automake >= 1:1.11
@@ -54,6 +55,7 @@ processos estão incluídas aqui.
 %setup -q -n acct-%{version}
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1
 
 %build
 %{__libtoolize}
diff --git a/acct-qsort.patch b/acct-qsort.patch
new file mode 100644
index 0000000..dae46da
--- /dev/null
+++ b/acct-qsort.patch
@@ -0,0 +1,55 @@
+--- acct-6.6.4/sa.c.orig
++++ acct-6.6.4/sa.c
+@@ -267,9 +267,8 @@
+ unsigned long hash_name (char *);
+ void update_command_list (char *, struct stats *, short fork_flag);
+ void update_user_list (char *, struct stats *);
+-int compare_sum_entry (struct hashtab_elem **, struct hashtab_elem **);
+-int compare_user_entry (struct hashtab_elem **,
+-                        struct hashtab_elem **);
++int compare_sum_entry (const void *, const void *);
++int compare_user_entry (const void *, const void *);
+ int compare_stats_entry (struct stats *, struct stats *);
+ void print_command_list (void);
+ void print_user_list (void);
+@@ -1445,16 +1444,20 @@
+   return 0;
+ }
+ 
+-int compare_user_entry(struct hashtab_elem **s1, struct hashtab_elem **s2)
++int compare_user_entry(const void *p1, const void *p2)
+ {
++  struct hashtab_elem * const *s1 = p1;
++  struct hashtab_elem * const *s2 = p2;
+   struct user_data *ud1 = hashtab_get_value (*s1);
+   struct user_data *ud2 = hashtab_get_value (*s2);
+ 
+   return compare_stats_entry (&(ud1->s), &(ud2->s));
+ }
+ 
+-int compare_sum_entry(struct hashtab_elem **s1, struct hashtab_elem **s2)
++int compare_sum_entry(const void *p1, const void *p2)
+ {
++  struct hashtab_elem * const *s1 = p1;
++  struct hashtab_elem * const *s2 = p2;
+   struct command_data *ud1 = hashtab_get_value (*s1);
+   struct command_data *ud2 = hashtab_get_value (*s2);
+ 
+@@ -1506,7 +1509,7 @@
+   Remember to correct the number of elements to adjust... */
+ 
+   qsort (entry_array + 1, (size_t) num_users - 1,
+-         sizeof (struct hashtab_elem *), (int (*)()) compare_user_entry);
++         sizeof (struct hashtab_elem *), compare_user_entry);
+ 
+   /* Now we've got a sorted list of user entries. */
+ 
+@@ -1686,7 +1689,7 @@
+      than the number of commands */
+ 
+   qsort (entry_array + 1, (size_t) num_commands - 1,
+-         sizeof (struct hashtab_entry *), (int (*)()) compare_sum_entry);
++         sizeof (struct hashtab_entry *), compare_sum_entry);
+ 
+   for (temp = 0; temp < num_commands; temp++)
+     {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/psacct.git/commitdiff/d43ab5dca7f47c9d4627466456670cc4e1b4f50e



More information about the pld-cvs-commit mailing list