diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-12-07 16:45:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-12-13 16:27:02 +0000 |
commit | 48d51338852a1667227dd0735d03f77d72d67247 (patch) | |
tree | cd3e25dba6682d7aa5cb65a3426e5788990502f7 | |
parent | 2624cb3dcfc2581bf64eae4675e96940adfb64da (diff) | |
download | ports-48d51338852a1667227dd0735d03f77d72d67247.tar.gz ports-48d51338852a1667227dd0735d03f77d72d67247.zip |
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.
PR: 268231
Approved by: romain (maintainer)
MFH: 2022Q4
-rw-r--r-- | textproc/augeas/files/patch-src_internal.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 |