From 2736d90da3dd10a002d7576c70a51e05cc66e29b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 5 Dec 2015 17:19:53 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/echoes.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/echoes.c') diff --git a/src/echoes.c b/src/echoes.c index 7274e52..bc8d3ff 100644 --- a/src/echoes.c +++ b/src/echoes.c @@ -47,6 +47,9 @@ static struct termios saved_stty; /** * Disable echoing and do anything else to the terminal settnings `passphrase_read` requires */ +#if defined(__GNUC__) && !defined(NEED_TERMIOS) +__attribute__((const)) +#endif /* __GNUC__ && !NEED_TERMIOS */ void passphrase_disable_echo(void) { passphrase_disable_echo1(STDIN_FILENO); @@ -56,6 +59,9 @@ void passphrase_disable_echo(void) /** * Undo the actions of `passphrase_disable_echo` */ +#if defined(__GNUC__) && !defined(NEED_TERMIOS) +__attribute__((const)) +#endif /* __GNUC__ && !NEED_TERMIOS */ void passphrase_reenable_echo(void) { passphrase_reenable_echo1(STDIN_FILENO); -- cgit v1.2.3-70-g09d2