When building multimedia/pipewire with newest Clang and without this patch I get /usr/local/include/readline/rltypedefs.h:35:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 35 | typedef int Function () __attribute__((deprecated)); | ^ | void /usr/local/include/readline/rltypedefs.h:36:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 36 | typedef void VFunction () __attribute__((deprecated)); | ^ | void /usr/local/include/readline/rltypedefs.h:37:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 37 | typedef char *CPFunction () __attribute__((deprecated)); | ^ | void /usr/local/include/readline/rltypedefs.h:38:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 38 | typedef char **CPPFunction () __attribute__((deprecated)); | ^ | void In file included from ../src/tools/pw-cli.c:19: /usr/local/include/readline/readline.h:410:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 410 | extern int rl_message (); | ^ | void
Created attachment 253726 [details] Patch
I'd like to name the patch file as patch-clangXX. Do you mean Clang 18 or Clang 19?
Clang 18 which is shipped with 15-CURRENT at the moment.
So, can we get this in?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ee994524fffdfcd9c887b6826889fa7539ff90c9 commit ee994524fffdfcd9c887b6826889fa7539ff90c9 Author: Gleb Popov <arrowd@FreeBSD.org> AuthorDate: 2024-09-30 13:12:46 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-09-30 13:38:46 +0000 devel/readline: Fix build for dependent ports with -Wstrict-prototypes on Clang 18 - Bump PORTREVISION for package change PR: 281633 devel/readline/Makefile | 1 + devel/readline/files/patch-clang18 (new) | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+)
Great, thanks!
This just made matters worse, cf. devel/rlwrap. The correct solution is to remove the #ifdef and leave only the correct prototype. We don't support compilers that don't support variadic functions.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6d04fa18daaad2b5452685c842f54430e5908bf8 commit 6d04fa18daaad2b5452685c842f54430e5908bf8 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2024-10-09 12:06:09 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-10-09 12:06:09 +0000 devel/readline: Fix build for dependent ports. Fixes: ee994524fffd PR: 281633 Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D46957 devel/readline/Makefile | 2 +- devel/readline/files/patch-clang18 | 29 ++++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-)