git: 52512eb129b1 - 2024Q2 - audio/csound: fix build with clang 18
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 20 Apr 2024 14:25:10 UTC
The branch 2024Q2 has been updated by dim:
URL: https://cgit.FreeBSD.org/ports/commit/?id=52512eb129b16872c9c75b7609e868b2b56f1cf5
commit 52512eb129b16872c9c75b7609e868b2b56f1cf5
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-03-27 19:53:05 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-04-20 14:24:57 +0000
audio/csound: fix build with clang 18
With clang 18, audio/csound fails to build:
/wrkdirs/usr/ports/audio/csound/work/csound-6.15.0/Opcodes/OSC.c:784:47: error: incompatible function pointer types passing 'int32_t (const char *, const char *, lo_arg **, int32_t, void *, void *)' (aka 'int (const char *, const char *, lo_arg **, int, void *, void *)') to parameter of type 'lo_method_handler' (aka 'int (*)(const char *, const char *, lo_arg **, int, struct lo_message_ *, void *)') [-Wincompatible-function-pointer-types]
784 | OSC_handler, p->port);
| ^~~~~~~~~~~
/usr/local/include/lo/lo_serverthread.h:151:72: note: passing argument to parameter 'h' here
151 | const char *typespec, lo_method_handler h,
| ^
This is because the callback functions OSC_handler() and OSC_ahandler()
have the wrong signature: liblo's headers use 'int' for the 'argc'
argument, and 'lo_message' for the 'data' argument. Fix the parameter
types of the functions to match the liblo declarations.
PR: 277999
Approved by: maintainer timeout (2 weeks)
MFH: 2024Q2
(cherry picked from commit 8556c08e0816597ed4e51e64ad5152c105feebd2)
---
audio/csound/files/patch-Opcodes_OSC.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/audio/csound/files/patch-Opcodes_OSC.c b/audio/csound/files/patch-Opcodes_OSC.c
new file mode 100644
index 000000000000..744ce92d1fb2
--- /dev/null
+++ b/audio/csound/files/patch-Opcodes_OSC.c
@@ -0,0 +1,20 @@
+--- Opcodes/OSC.c.orig 2020-08-13 23:03:03 UTC
++++ Opcodes/OSC.c
+@@ -477,7 +477,7 @@ static int32_t OSC_handler(const char *path, const cha
+ }
+
+ static int32_t OSC_handler(const char *path, const char *types,
+- lo_arg **argv, int32_t argc, void *data, void *p)
++ lo_arg **argv, int argc, lo_message data, void *p)
+ {
+ IGN(argc); IGN(data);
+ OSC_PORT *pp = (OSC_PORT*) p;
+@@ -958,7 +958,7 @@ static int32_t OSC_ahandler(const char *path, const ch
+ /* ******** ARRAY VERSION **** EXPERIMENTAL *** */
+
+ static int32_t OSC_ahandler(const char *path, const char *types,
+- lo_arg **argv, int32_t argc, void *data, void *p)
++ lo_arg **argv, int argc, lo_message data, void *p)
+ {
+ IGN(argc); IGN(data);
+ OSC_PORT *pp = (OSC_PORT*) p;