Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Oct 2024 19:32:01 GMT
From:      Chris Rees <crees@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 38dbaaa03aa5 - main - audio/oss: Build fix for clang 19
Message-ID:  <202410171932.49HJW1nA042549@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by crees:

URL: https://cgit.FreeBSD.org/ports/commit/?id=38dbaaa03aa58861e78dafb674e3e2ed5b7eda7c

commit 38dbaaa03aa58861e78dafb674e3e2ed5b7eda7c
Author:     Chris Rees <crees@FreeBSD.org>
AuthorDate: 2024-10-17 19:29:33 +0000
Commit:     Chris Rees <crees@FreeBSD.org>
CommitDate: 2024-10-17 19:31:52 +0000

    audio/oss: Build fix for clang 19
    
    PR:             ports/282164
    Thanks to:      dim
---
 .../patch-kernel_framework_sndstat_oss__sndstat.c  | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/audio/oss/files/patch-kernel_framework_sndstat_oss__sndstat.c b/audio/oss/files/patch-kernel_framework_sndstat_oss__sndstat.c
new file mode 100644
index 000000000000..bafb1f61a2f3
--- /dev/null
+++ b/audio/oss/files/patch-kernel_framework_sndstat_oss__sndstat.c
@@ -0,0 +1,26 @@
+Thanks to dim@
+
+Clang 19 has become more strict about erroneous redeclarations, which
+results in an error building audio/oss:
+
+  oss_sndstat.c:114:17: error: redeclaration of 'version' with a different type: 'char[]' vs 'const char[]'
+    114 |     extern char version[];
+        |                 ^
+  /usr/include/sys/systm.h:54:19: note: previous declaration is here
+     54 | extern const char version[];    /* system version */
+        |                   ^
+
+Since version[] has been a const char for quite a while now, adjust the
+redeclaration in oss_sndstat.c. Note that it also might be deleted
+entirely, since the file already includes <sys/systm.h>.
+
+--- kernel/framework/sndstat/oss_sndstat.c.orig	2024-10-17 19:27:09 UTC
++++ kernel/framework/sndstat/oss_sndstat.c
+@@ -111,7 +111,6 @@ init_status (void)
+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+   {
+ #if defined(__FreeBSD__)
+-    extern char version[];
+ #endif
+ 
+     put_status ("Kernel: ");


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410171932.49HJW1nA042549>