Bug 268231

Summary: textproc/augeas: fix build with clang 15
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: FreeBSD Puppet Team <puppet>
Status: Closed FIXED    
Severity: Affects Some People CC: freebsd, romain
Priority: --- Flags: romain: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 265425    
Attachments:
Description Flags
textproc/augeas: fix build with clang 15 none

Description Dimitry Andric freebsd_committer freebsd_triage 2022-12-07 16:50:09 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2022-12-07 16:50:34 UTC
Created attachment 238608 [details]
textproc/augeas: fix build with clang 15
Comment 2 Mina Galić freebsd_triage 2022-12-07 16:53:52 UTC
why not submit that upstream?
it looks like development has picked up again
https://github.com/hercules-team/augeas/
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2022-12-07 17:29:12 UTC
(In reply to Mina Galić from comment #2)
I'm fine with somebody else submitting my patch, but I'm busy with other things at the moment. :)
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2022-12-08 12:12:41 UTC
Oh well. https://github.com/hercules-team/augeas/pull/791 :)
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-12-13 16:28:24 UTC
A commit in branch main references this bug:

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 (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)