changeset 17741:82713b8ea002

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.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 07 Aug 2014 18:13:41 -0700
parents be8b85935367
children b478eeaef4a3
files ChangeLog lib/getpass.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-08-07  Paul Eggert  <eggert@cs.ucla.edu>
 
+	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
--- a/lib/getpass.c
+++ b/lib/getpass.c
@@ -85,7 +85,9 @@
 {
   FILE *tty;
   FILE *in, *out;
+# if HAVE_TCGETATTR
   struct termios s, t;
+# endif
   bool tty_changed = false;
   static char *buf;
   static size_t bufsize;