Date: Wed, 02 Oct 2024 12:47:49 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 281817] net/samba416: fix rl_completion_func_t detection and usage Message-ID: <bug-281817-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281817 Bug ID: 281817 Summary: net/samba416: fix rl_completion_func_t detection and usage Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: samba@FreeBSD.org Reporter: dim@FreeBSD.org Flags: maintainer-feedback?(samba@FreeBSD.org) Assignee: samba@FreeBSD.org net/samba416: fix rl_completion_func_t detection and usage After a recent devel/readline update, net/samba416 fails to compile with clang 19, resulting in errors similar to: ../../libcli/smbreadline/smbreadline.c:139:38: warning: 'CPPFunction' is deprecated [-Wdeprecated-declarations] 139 | rl_attempted_completion_function =3D RL_COMPLETIO= N_CAST completion_fn; | ^ ../../lib/replace/system/readline.h:50:31: note: expanded from macro 'RL_COMPLETION_CAST' 50 | # define RL_COMPLETION_CAST (CPPFunction *) | ^ /usr/local/include/readline/rltypedefs.h:38:50: note: 'CPPFunction' has b= een explicitly marked deprecated here 38 | typedef char **CPPFunction (void) __attribute__((deprecated)); | ^ ../../libcli/smbreadline/smbreadline.c:139:36: error: incompatible functi= on pointer types assigning to 'rl_completion_func_t *' (aka 'char **(*)(const = char *, int, int)') from 'CPPFunction *' (aka 'char **(*)(void)') [-Wincompatible-function-pointer-types] 139 | rl_attempted_completion_function =3D RL_COMPLETIO= N_CAST completion_fn; | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There are two reasons: samba checks for `rl_completion_t`, while the actual readline type is `rl_completion_func_t`, and samba's wrapper `readline.h` header prefers the `CPPFunction` type which is deprecated, while it should use `rl_completion_func_t` instead. Fix the `wscript_configure` check to detect `rl_completion_func_t`, and reverse the `HAVE_RL_COMPLETION_T` and `HAVE_CPPFUNCTION` checks in the wrapper header. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-281817-7788>