--- /dev/null
+diff -u -r ../mariadb-10.1.22/client/mysql.cc ./client/mysql.cc
+--- ../mariadb-10.1.22/client/mysql.cc 2017-03-11 20:08:54.000000000 +0100
++++ ./client/mysql.cc 2017-04-07 03:12:08.091397345 +0200
+@@ -2676,9 +2676,9 @@
+ #ifdef HAVE_LOCALE_H
+ setlocale(LC_ALL,""); /* so as libedit use isprint */
+ #endif
+- rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
+- rl_completion_entry_function= &no_completion;
+- rl_add_defun("magic-space", (Function*)&fake_magic_space, -1);
++ rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
++ rl_completion_entry_function= (rl_compentry_func_t*)&no_completion;
++ rl_add_defun("magic-space", (rl_command_func_t*)&fake_magic_space, -1);
+ #else
+ rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
+ rl_completion_entry_function= &no_completion;
+@@ -2700,7 +2700,7 @@
+ #if defined(USE_NEW_READLINE_INTERFACE)
+ return rl_completion_matches(text, new_command_generator);
+ #else
+- return completion_matches((char *)text, (CPFunction *)new_command_generator);
++ return completion_matches((char *)text, (rl_compentry_func_t *)new_command_generator);
+ #endif
+ else
+ return (char**) 0;