diff -ruNp mysql-5.7.21.orig/client/mysql.cc mysql-5.7.21/client/mysql.cc --- mysql-5.7.21.orig/client/mysql.cc 2017-12-28 04:46:26.000000000 +0100 +++ mysql-5.7.21/client/mysql.cc 2018-03-31 21:37:27.879569060 +0200 @@ -67,6 +67,7 @@ #else #include #include +#include #define HAVE_READLINE #define USE_POPEN #endif @@ -1126,22 +1127,6 @@ static const char *embedded_server_group { "server", "embedded", "mysql_SERVER", 0 }; #ifdef HAVE_READLINE -/* - HIST_ENTRY is defined for libedit, but not for the real readline - Need to redefine it for real readline to find it -*/ -#if !defined(HAVE_HIST_ENTRY) -typedef struct _hist_entry { - const char *line; - const char *data; -} HIST_ENTRY; -#endif - -extern "C" int add_history(const char *command); /* From readline directory */ -extern "C" int read_history(const char *command); -extern "C" int write_history(const char *command); -extern "C" HIST_ENTRY *history_get(int num); -extern "C" int history_length; static int not_in_history(const char *line); static void initialize_readline (char *name); #endif /* HAVE_READLINE */