Fix GLIBTOP_CMND_PROC_IO and unbreak the build with clang 15

Same fix present upstream.  ok ajacoutot@ (maintainer)
This commit is contained in:
jca 2023-01-25 13:09:00 +00:00
parent c269ddac14
commit 7c95aa460f
2 changed files with 18 additions and 1 deletions

View File

@ -6,7 +6,7 @@ COMMENT= portable library for obtaining system information
GNOME_VERSION= 2.40.0
GNOME_PROJECT= libgtop
PKGNAME= libgtop2-${VERSION}
REVISION= 4
REVISION= 5
SHARED_LIBS= gtop-2.0 10.0 # .10.0

View File

@ -0,0 +1,17 @@
Pass correct parameter
https://gitlab.gnome.org/GNOME/libgtop/-/commit/df6393ac0cd785727329a97f731a4067334c0ace
Index: src/daemon/main.c
--- src/daemon/main.c.orig
+++ src/daemon/main.c
@@ -222,8 +222,9 @@ handle_parent_connection (int s)
0, NULL);
break;
case GLIBTOP_CMND_PROC_IO:
+ memcpy (&pid, parameter, sizeof (pid_t));
glibtop_get_proc_io_l
- (server, &resp->u.data.proc_io, parameter);
+ (server, &resp->u.data.proc_io, pid);
do_output (s, resp, _offset_data (proc_io),
0, NULL);
break;