diff --git a/fish_pager.cpp b/fish_pager.cpp index fac704977..2e1a4bbaa 100644 --- a/fish_pager.cpp +++ b/fish_pager.cpp @@ -1069,8 +1069,8 @@ static void init(int mangle_descriptors, int out) exit(1); } - - if (setupterm(0, STDOUT_FILENO, 0) == ERR) + int errret; + if (setupterm(0, STDOUT_FILENO, &errret) == ERR) { debug(0, _(L"Could not set up terminal")); exit(1); diff --git a/input.cpp b/input.cpp index f786b26ea..6127e23fa 100644 --- a/input.cpp +++ b/input.cpp @@ -336,7 +336,8 @@ int input_init() input_common_init(&interrupt_handler); - if (setupterm(0, STDOUT_FILENO, 0) == ERR) + int errret; + if (setupterm(0, STDOUT_FILENO, &errret) == ERR) { debug(0, _(L"Could not set up terminal")); exit_without_destructors(1);