On Sun, Jan 08 2023, Jeremie Courreges-Anglas <jca@wxcvbn.org> wrote:
> On Sun, Jan 08 2023, Jérémie Courrèges-Anglas <jca@wxcvbn.org> wrote:
[...]
>> https://wxcvbn.org/~jca/build-failures/amd64-clang/2023-01-03/devel/libgtop2.txt
> main.c:226:35: error: incompatible pointer to integer conversion passing 'char[1024]' to parameter of type 'pid_t' (aka 'int') [-Wint-conversion]
> (server, &resp->u.data.proc_io, parameter);
> ^~~~~~~~~
Easy one. ok?
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/devel/libgtop2/Makefile,v
retrieving revision 1.150
diff -u -p -r1.150 Makefile
--- Makefile 5 Nov 2022 17:06:25 -0000 1.150
+++ Makefile 11 Jan 2023 22:54:48 -0000
@@ -6,7 +6,7 @@ COMMENT= portable library for obtaining
GNOME_VERSION= 2.40.0
GNOME_PROJECT= libgtop
PKGNAME= libgtop2-${VERSION}
-REVISION= 4
+REVISION= 5
SHARED_LIBS= gtop-2.0 10.0 # .10.0
Index: patches/patch-src_daemon_main_c
===================================================================
RCS file: patches/patch-src_daemon_main_c
diff -N patches/patch-src_daemon_main_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_daemon_main_c 11 Jan 2023 22:54:42 -0000
@@ -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;
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
No comments:
Post a Comment