From 59893aec3dbebe8c5b5763107b060183852235cb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 7 Aug 2014 18:13:41 -0700 Subject: [PATCH] getpass: don't assume struct termios Problem report and trivial fix by Jonas 'Sortie' Termansen in: http://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00015.html * lib/getpass.c (getpass): Port to systems lacking struct termios. --- ChangeLog | 5 +++++ lib/getpass.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index b0ba90a8c1..f5fdea6b40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2014-08-07 Paul Eggert + getpass: don't assume struct termios + Problem report and trivial fix by Jonas 'Sortie' Termansen in: + http://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00015.html + * lib/getpass.c (getpass): Port to systems lacking struct termios. + getdtablesize: fall back on sysconf (_SC_OPEN_MAX) Problem reported by Jonas 'Sortie' Termansen in: http://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00023.html diff --git a/lib/getpass.c b/lib/getpass.c index 43d0d5947e..18dc0b7ef8 100644 --- a/lib/getpass.c +++ b/lib/getpass.c @@ -85,7 +85,9 @@ getpass (const char *prompt) { FILE *tty; FILE *in, *out; +# if HAVE_TCGETATTR struct termios s, t; +# endif bool tty_changed = false; static char *buf; static size_t bufsize; -- 2.39.5