diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-10-02 13:31:20 +0200 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-10-02 15:38:59 +0200 |
commit | 48cea5704f4376df85a42c5b145c62f8830c6822 (patch) | |
tree | 6881555d746450f9aa6de8a0edaf0dcfeb8b4f5a /java | |
parent | net/samba419: fix rl_completion_func_t detection and usage (diff) |
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 = RL_COMPLETION_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 been explicitly marked deprecated here
38 | typedef char **CPPFunction (void) __attribute__((deprecated));
| ^
../../libcli/smbreadline/smbreadline.c:139:36: error: incompatible function 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 = RL_COMPLETION_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.
PR: 281817
Approved by: samba (0mp)
Reviewed by: 0mp
MFH: 2024Q3
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions