Bug 271707 - multimedia/vdr: fix build with clang 16
Summary: multimedia/vdr: fix build with clang 16
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-05-29 14:10 UTC by Dimitry Andric
Modified: 2023-06-04 16:25 UTC (History)
1 user (show)

See Also:


Attachments
multimedia/vdr: fix build with clang 16 (1.19 KB, patch)
2023-05-29 14:11 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-05-29 14:10:40 UTC
Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because multimedia/vdr's Makefile does not explicitly set its C++
standard, this leads to an error:

  util.c:269:4: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
     register int i;
     ^~~~~~~~~

Because the port's own Makefile is rather non-standard it does not
respect USE_CXXSTD=, so patch away the 'register' keyword instead.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-05-29 14:11:06 UTC
Created attachment 242479 [details]
multimedia/vdr: fix build with clang 16
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2023-05-30 06:31:09 UTC
^Triage: reporter is committer, assign accordingly
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2023-05-30 20:59:43 UTC
(In reply to Fernando Apesteguía from comment #2)
Since this port does not seem to have a maintainer, can I just commit the fix? :)
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2023-05-31 06:10:28 UTC
(In reply to Dimitry Andric from comment #3)
Yes :-)

Any committer may commit to any repository with an accepted review from any committer with existing access to that repository.

Committers may obtain review via a Differential in Phabricator, adding the "Contributor Reviewers ($Repository)" group as a Reviewer, reaching out to other committers; directly or via mailing lists, or setting the attachment flag to: maintainer-approval ? <person-youd-like-to-review>

So here is my thumbs up: LGTM!
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-06-04 16:22:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=83a6aff27701c52b445db12baee2a98c8cfd4135

commit 83a6aff27701c52b445db12baee2a98c8cfd4135
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-05-29 14:09:31 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-04 16:21:24 +0000

    multimedia/vdr: fix build with clang 16

    Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
    Because multimedia/vdr's Makefile does not explicitly set its C++
    standard, this leads to an error:

      util.c:269:4: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
         register int i;
         ^~~~~~~~~

    Because the port's own Makefile is rather non-standard it does not
    respect USE_CXXSTD=, so patch away the 'register' keyword instead.

    PR:             271707
    Approved by:    fernape
    MFH:            2023Q2

 multimedia/vdr/Makefile                       |  2 +-
 multimedia/vdr/files/patch-libsi_util.c (new) | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)