git: 48d51338852a - main - textproc/augeas: fix build with clang 15

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Tue, 13 Dec 2022 16:27:43 UTC
The branch main has been updated by dim (src committer):

URL: https://cgit.FreeBSD.org/ports/commit/?id=48d51338852a1667227dd0735d03f77d72d67247

commit 48d51338852a1667227dd0735d03f77d72d67247
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-12-07 16:45:56 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-12-13 16:27:02 +0000

    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
---
 textproc/augeas/files/patch-src_internal.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

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