Skip to content

Commit

Permalink
multimedia/vdr: fix build with clang 16
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DimitryAndric committed Jun 4, 2023
1 parent eff4307 commit 83a6aff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion multimedia/vdr/Makefile
@@ -1,6 +1,6 @@
PORTNAME= vdr
PORTVERSION= 1.7.29
PORTREVISION= 15
PORTREVISION= 16
CATEGORIES= multimedia
MASTER_SITES= ftp://ftp.tvdr.de/vdr/Developer/
DIST_SUBDIR= vdr
Expand Down
11 changes: 11 additions & 0 deletions multimedia/vdr/files/patch-libsi_util.c
@@ -0,0 +1,11 @@
--- libsi/util.c.orig 2006-02-18 11:17:50 UTC
+++ libsi/util.c
@@ -266,7 +266,7 @@ u_int32_t CRC32::crc32 (const char *d, int len, u_int3

u_int32_t CRC32::crc32 (const char *d, int len, u_int32_t crc)
{
- register int i;
+ int i;
const unsigned char *u=(unsigned char*)d; // Saves '& 0xff'

for (i=0; i<len; i++)

0 comments on commit 83a6aff

Please sign in to comment.