FreeBSD Bugzilla – Attachment 238740 Details for
Bug 268341
archivers/rpm4: fix build with clang 15
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
archivers/rpm4: fix build with clang 15
archivers__rpm4-fix-clang15-build-1.diff (text/plain), 1.87 KB, created by
Dimitry Andric
on 2022-12-12 20:35:22 UTC
(
hide
)
Description:
archivers/rpm4: fix build with clang 15
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2022-12-12 20:35:22 UTC
Size:
1.87 KB
patch
obsolete
>commit 36d0aeb11b808cee6a7d8df97662e94648eb9a09 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Mon Dec 12 21:30:27 2022 +0100 > > archivers/rpm4: fix build with clang 15 > > During an exp-run for llvm 15 (see bug 265425), it turned out that > archivers/rpm4 failed to build with clang 15: > > tools/rpmuncompress.c:101:23: warning: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > const char *bn = basename(fn); > ^ > tools/rpmuncompress.c:101:18: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion] > const char *bn = basename(fn); > ^ ~~~~~~~~~~~~ > > This is because basename(3) is defined in <libgen.h>. After this include > is added to rpmuncompress.c, link errors still occur: > > ld: error: undefined symbol: WIFEXITED > >>> referenced by rpmuncompress.c > >>> tools/rpmuncompress.o:(main) > > ld: error: undefined symbol: WEXITSTATUS > >>> referenced by rpmuncompress.c > >>> tools/rpmuncompress.o:(main) > > This is because WIFEXITED() and WEXITSTATUS() are macros defined in > <sys/wait.h>. > >diff --git a/archivers/rpm4/files/patch-tools_rpmuncompress.c b/archivers/rpm4/files/patch-tools_rpmuncompress.c >index 0e8f99d25dfa..23dc0cc83dea 100644 >--- a/archivers/rpm4/files/patch-tools_rpmuncompress.c >+++ b/archivers/rpm4/files/patch-tools_rpmuncompress.c >@@ -1,9 +1,12 @@ > --- tools/rpmuncompress.c.orig 2022-08-30 11:42:23 UTC > +++ tools/rpmuncompress.c >-@@ -1,5 +1,6 @@ >+@@ -1,7 +1,9 @@ > #include "system.h" > > +#include <sys/wait.h> > #include <popt.h> > #include <errno.h> >++#include <libgen.h> > #include <stdio.h> >+ #include <string.h> >+
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
Flags:
rodrigo
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 268341
: 238740