diff -ur percona-server-5.7.35-38.orig/cmake/readline.cmake percona-server-5.7.35-38/cmake/readline.cmake --- percona-server-5.7.35-38.orig/cmake/readline.cmake 2021-11-24 19:49:56.851969940 +0100 +++ percona-server-5.7.35-38/cmake/readline.cmake 2021-11-24 19:50:52.286101293 +0100 @@ -110,23 +110,23 @@ MACRO (FIND_SYSTEM_EDITLINE) FIND_PATH(FOUND_EDITLINE_READLINE - NAMES editline/readline.h + NAMES readline/readline.h ) IF(FOUND_EDITLINE_READLINE) - SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/editline") + SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/readline") ELSE() # Different path on FreeBSD FIND_PATH(FOUND_EDIT_READLINE_READLINE NAMES edit/readline/readline.h ) IF(FOUND_EDIT_READLINE_READLINE) - SET(EDITLINE_INCLUDE_DIR "${FOUND_EDIT_READLINE_READLINE}/edit/readline") + SET(EDITLINE_INCLUDE_DIR "${FOUND_EDIT_READLINE_READLINE}/readline") ENDIF() ENDIF() FIND_LIBRARY(EDITLINE_LIBRARY NAMES - edit + readline ) MARK_AS_ADVANCED(EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY) @@ -141,7 +141,7 @@ LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${EDITLINE_LIBRARY}) CHECK_CXX_SOURCE_COMPILES(" #include - #include + #include int main(int argc, char **argv) { HIST_ENTRY entry; @@ -151,14 +151,13 @@ CHECK_CXX_SOURCE_COMPILES(" #include - #include + #include int main(int argc, char **argv) { - typedef int MYFunction(const char*, int); - MYFunction* myf= rl_completion_entry_function; - int res= (myf)(NULL, 0); - completion_matches(0,0); - return res; + rl_compentry_func_t *myf= rl_completion_entry_function; + char *res= (myf)(NULL, 0); + rl_completion_matches(0,0); + return res ? 0 : 1; }" XLINE_HAVE_COMPLETION_INT)