summaryrefslogtreecommitdiff
path: root/net/samba416/files/0029-Fix-rl_completion_func_t.patch
blob: 67cba786e3f5bc88bf8c0ffbc8d3228bc201a824 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- a/lib/replace/system/readline.h	2022-01-24 11:26:58.905306300 +0100
+++ b/lib/replace/system/readline.h	2024-10-02 12:48:20.110740000 +0200
@@ -46,10 +46,10 @@
 #endif
 
 #ifdef HAVE_NEW_LIBREADLINE
-#ifdef HAVE_CPPFUNCTION
+#if defined(HAVE_RL_COMPLETION_FUNC_T)
+#  define RL_COMPLETION_CAST (rl_completion_func_t *)
+#elif defined(HAVE_CPPFUNCTION)
 #  define RL_COMPLETION_CAST (CPPFunction *)
-#elif defined(HAVE_RL_COMPLETION_T)
-#  define RL_COMPLETION_CAST (rl_completion_t *)
 #else
 #  define RL_COMPLETION_CAST
 #endif
--- a/libcli/smbreadline/wscript_configure	2022-01-24 11:26:58.973306700 +0100
+++ b/libcli/smbreadline/wscript_configure	2024-10-02 12:48:20.110969000 +0200
@@ -51,10 +51,10 @@ conf.CHECK_CODE('''
 #    endif
 #  endif
 #endif
-int main(void) {rl_completion_t f; return 0;}
+int main(void) {rl_completion_func_t f; return 0;}
 ''',
 'HAVE_RL_COMPLETION_FUNC_T', execute=False, addmain=False,
-msg='Checking for rl_completion_t')
+msg='Checking for rl_completion_func_t')
 
 conf.CHECK_CODE('''
 #ifdef HAVE_READLINE_READLINE_H