about summary refs log tree commit diff
path: root/src/nmcli/common.h
diff options
context:
space:
mode:
authorJeremy Bicha <jeremy.bicha@canonical.com>2022-02-03 09:24:19 -0500
committerJeremy Bicha <jeremy.bicha@canonical.com>2022-02-03 12:01:26 -0500
commit240934659cd8326a14324c73d4f0f88eecfddcab (patch)
treee07cde48aa0a143bebf10ca7103cc0e69febad25 /src/nmcli/common.h
parentfbe61ddadf4a89800a8e3651ae91099259ddf2ad (diff)
parent1628eda029ba4dede8d4d45572c6b60367882436 (diff)
Merge tag 'debian/1.34.0-2' into ubuntu/master
network-manager Debian release 1.34.0-2
Diffstat (limited to 'src/nmcli/common.h')
-rw-r--r--src/nmcli/common.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nmcli/common.h b/src/nmcli/common.h
index a479a455..908dad06 100644
--- a/src/nmcli/common.h
+++ b/src/nmcli/common.h
@@ -50,9 +50,17 @@ char *           nmc_rl_gen_func_ifnames(const char *text, int state);
 gboolean         nmc_get_in_readline(void);
 void             nmc_set_in_readline(gboolean in_readline);
 
+#if HAVE_EDITLINE_READLINE
+/* libedit has different signature for rl_startup_hook function */
+#define _NMC_RL_STARTUPHOOK_ARGS const char *c, int i
+#else
+/* By default the libreadline shall be used */
+#define _NMC_RL_STARTUPHOOK_ARGS void
+#endif
+
 /* for pre-filling a string to readline prompt */
 extern char *nmc_rl_pre_input_deftext;
-int          nmc_rl_set_deftext(void);
+int          nmc_rl_set_deftext(_NMC_RL_STARTUPHOOK_ARGS);
 
 char *nmc_parse_lldp_capabilities(guint value);