From a5d290b6b434c9dcc209da111b874659543cad45 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 4 Jun 2023 09:07:54 +0100 Subject: ash: fix build with line editing disabled Commit 64c8f5f3d0 (ash: add support for INT trap) made some changes to the line editing code. As a result building the shell with line editing disabled fails. Add the necessary conditional compilation to restore the ability to do this. --- shell/ash.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/ash.c b/shell/ash.c index 7fa75721e..b29927a83 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -15242,14 +15242,18 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) // trap '' INT disables Ctrl-C, anything else enables it if (action && action[0] == '\0') { SetConsoleCtrlHandler(NULL, TRUE); +# if ENABLE_FEATURE_EDITING if (line_input_state) { line_input_state->flags |= IGNORE_CTRL_C; } +# endif } else { SetConsoleCtrlHandler(NULL, FALSE); +# if ENABLE_FEATURE_EDITING if (line_input_state) { line_input_state->flags &= ~IGNORE_CTRL_C; } +# endif } } #else -- cgit v1.2.3-55-g6feb