FreeBSD Bugzilla – Attachment 238648 Details for
Bug 268260
devel/libgtop: fix build with clang 15
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
devel/libgtop: fix build with clang 15
devel__libgtop-fix-clang15-build-1.diff (text/plain), 1.85 KB, created by
Dimitry Andric
on 2022-12-08 22:45:15 UTC
(
hide
)
Description:
devel/libgtop: fix build with clang 15
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2022-12-08 22:45:15 UTC
Size:
1.85 KB
patch
obsolete
>commit 289b69fd420a43ecdb374495b90b86ae8bae9ebf >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Thu Dec 8 23:41:12 2022 +0100 > > devel/libgtop: fix build with clang 15 > > During an exp-run for llvm 15 (see bug 265425), it turned out that > devel/libgtop failed to build with clang 15: > > 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); > ^~~~~~~~~ > ../../include/glibtop/procio.h:78:74: note: passing argument to parameter 'pid' here > void glibtop_get_proc_io_l (glibtop *server, glibtop_proc_io *buf, pid_t pid); > ^ > > Indeed the parameter is supposed to be a pid_t, and upstream fixed this > in <https://gitlab.gnome.org/GNOME/libgtop/-/commit/df6393ac>. > >diff --git a/devel/libgtop/files/patch-commit-df6393ac b/devel/libgtop/files/patch-commit-df6393ac >new file mode 100644 >index 000000000000..a7eead71373b >--- /dev/null >+++ b/devel/libgtop/files/patch-commit-df6393ac >@@ -0,0 +1,21 @@ >+commit df6393ac0cd785727329a97f731a4067334c0ace >+Author: Avinash Sonawane <rootkea@gmail.com> >+Date: Mon Dec 20 13:33:42 2021 +0530 >+ >+ Pass correct parameter >+ >+diff --git src/daemon/main.c b/src/daemon/main.c >+index cd940353..47a94586 100644 >+--- src/daemon/main.c >++++ src/daemon/main.c >+@@ -226,8 +226,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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268260
: 238648