FreeBSD Bugzilla – Attachment 238608 Details for
Bug 268231
textproc/augeas: fix build with clang 15
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
textproc/augeas: fix build with clang 15
textproc__augeas-fix-clang15-build-1.diff (text/plain), 1.30 KB, created by
Dimitry Andric
on 2022-12-07 16:50:34 UTC
(
hide
)
Description:
textproc/augeas: fix build with clang 15
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2022-12-07 16:50:34 UTC
Size:
1.30 KB
patch
obsolete
>commit 95732e944c6eb24f5014779d3384f65bd469f27f >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Wed Dec 7 17:45:56 2022 +0100 > > textproc/augeas: fix build with clang 15 > > During an exp-run for llvm 15 (see bug 265425), it turned out that > textproc/augeas failed to build with clang 15: > > internal.c:436:12: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'const char *' [-Wint-conversion] > return strerror_r(errnum, buf, len); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 error generated. > > This is because the GNU variant of strerror_r() is erroneously chosen. > Use the BSD variant instead. > >diff --git a/textproc/augeas/files/patch-src_internal.c b/textproc/augeas/files/patch-src_internal.c >new file mode 100644 >index 000000000000..58fd0c0ad92e >--- /dev/null >+++ b/textproc/augeas/files/patch-src_internal.c >@@ -0,0 +1,11 @@ >+--- src/internal.c.orig 2018-08-10 20:17:35 UTC >++++ src/internal.c >+@@ -431,7 +431,7 @@ const char *xstrerror(int errnum, char *buf, size_t le >+ >+ const char *xstrerror(int errnum, char *buf, size_t len) { >+ #ifdef HAVE_STRERROR_R >+-# ifdef __USE_GNU >++# if defined(__USE_GNU) && defined(__GLIBC__) >+ /* Annoying linux specific API contract */ >+ return strerror_r(errnum, buf, len); >+ # else
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 268231
: 238608