diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-09-07 19:50:57 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-09-08 18:00:17 +0200 |
commit | 8860ffdc093f19a6b0fe1abd43ff782d938a2d2d (patch) | |
tree | 0bb9148eb061ae31676426f22ed6132be8a07c6d /vtysh | |
parent | lib: Detect if pthread_condattr_setclock is available (diff) | |
download | frr-8860ffdc093f19a6b0fe1abd43ff782d938a2d2d.tar.xz frr-8860ffdc093f19a6b0fe1abd43ff782d938a2d2d.zip |
vtysh: Add code to isolate append_history
The append_history function in lib readline appears to
not be universally available across all of the esoteric
platforms we may want to compile on. As such
provide a way to gracefully do nothing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh_main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index 86fa62f47..7e979f2c8 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -30,6 +30,16 @@ #include <readline/readline.h> #include <readline/history.h> +/* + * The append_history function only appears in newer versions + * of the readline library it appears like. Since we don't + * need this just silently ignore the code on these + * ancient platforms. + */ +#if !defined HAVE_APPEND_HISTORY +#define append_history(A, B) +#endif + #include <lib/version.h> #include "getopt.h" #include "command.h" |