diff --git a/ext/readline/readline.c b/ext/readline/readline.c index bd460696bd7..d4032ca9471 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -170,7 +170,10 @@ ZEND_GET_MODULE(readline) PHP_MINIT_FUNCTION(readline) { - using_history(); +#if HAVE_LIBREADLINE + /* libedit don't need this call which set the tty in cooked mode */ + using_history(); +#endif return PHP_MINIT(cli_readline)(INIT_FUNC_ARGS_PASSTHRU); }