From 7c6b9d2db7507cb26402903734cc28687f1e9b0b Mon Sep 17 00:00:00 2001
From: Botond Baranyi <botond.baranyi@ericsson.com>
Date: Tue, 6 Oct 2020 11:02:49 +0200
Subject: [PATCH] Added support for more libedit versions (Bug 565893)

Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com>
Change-Id: I227f30de26239d5266a938fd431db59ced6cc1fb
---
 mctr2/cli/Cli.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mctr2/cli/Cli.cc b/mctr2/cli/Cli.cc
index eb747a84e..551fb6c6b 100644
--- a/mctr2/cli/Cli.cc
+++ b/mctr2/cli/Cli.cc
@@ -31,7 +31,6 @@
 #include "../mctr/MainController.h"
 
 #include <stdio.h>
-#include <readline.h>
 #include <ctype.h>
 #include <string.h>
 #include <errno.h>
@@ -43,6 +42,11 @@
 #include "../../common/config_preproc.h"
 #include "../../core/DebugCommands.hh"
 
+#include <readline.h>
+#if RL_READLINE_VERSION == 0x0603
+#include <history.h>
+#endif
+
 #define PROMPT "MC2> "
 #define CMTC_TEXT "cmtc"
 #define SMTC_TEXT "smtc"
-- 
GitLab