-diff -ru source/builtins/read.def source-new/builtins/read.def
---- source/builtins/read.def	2016-05-16 11:24:56.000000000 -0700
-+++ source-new/builtins/read.def	2017-08-07 19:03:27.778688703 -0700
-@@ -94,8 +94,6 @@
- #include "common.h"
- #include "bashgetopt.h"
- 
--#include <shtty.h>
--
- #if defined (READLINE)
- #include "../bashline.h"
- #include <readline/readline.h>
-@@ -119,7 +117,6 @@
- struct ttsave
- {
-   int fd;
--  TTYSTRUCT *attrs;
- };
- 
- #if defined (READLINE)
-@@ -192,7 +189,6 @@
-   char *e, *t, *t1, *ps2, *tofree;
-   struct stat tsb;
-   SHELL_VAR *var;
--  TTYSTRUCT ttattrs, ttset;
- #if defined (ARRAY_VARS)
-   WORD_LIST *alist;
- #endif
-@@ -482,11 +478,6 @@
- 	{
- 	  /* ttsave() */
- 	  termsave.fd = fd;
--	  ttgetattr (fd, &ttattrs);
--	  termsave.attrs = &ttattrs;
--
--	  ttset = ttattrs;	  
--	  i = silent ? ttfd_cbreak (fd, &ttset) : ttfd_onechar (fd, &ttset);
- 	  if (i < 0)
- 	    sh_ttyerror (1);
- 	  tty_modified = 1;
-@@ -499,14 +490,6 @@
-     {
-       /* ttsave (); */
-       termsave.fd = fd;
--      ttgetattr (fd, &ttattrs);
--      termsave.attrs = &ttattrs;
--
--      ttset = ttattrs;
--      i = ttfd_noecho (fd, &ttset);			/* ttnoecho (); */
--      if (i < 0)
--	sh_ttyerror (1);
--
-       tty_modified = 1;
-       add_unwind_protect ((Function *)ttyrestore, (char *)&termsave);
-       if (interactive_shell == 0)
-@@ -995,7 +978,6 @@
- ttyrestore (ttp)
-      struct ttsave *ttp;
- {
--  ttsetattr (ttp->fd, ttp->attrs);
-   tty_modified = 0;
- }
- 
 diff -ru source/general.c source-new/general.c
 --- source/general.c	2016-08-11 08:16:56.000000000 -0700
 +++ source-new/general.c	2017-08-07 19:55:47.437464359 -0700

+#if 0
   int tty_fd;
   char *tty;
 
@@ -490,6 +491,7 @@
     }
   if (tty_fd >= 0)
     close (tty_fd);
+#endif
 }
 
 /* Return 1 if PATH1 and PATH2 are the same file.  This is kind of
diff -ru source/include/posixwait.h source-new/include/posixwait.h
--- source/include/posixwait.h	2008-08-12 07:03:03.000000000 -0700
+++ source-new/include/posixwait.h	2017-08-07 18:37:29.854754332 -0700
@@ -34,7 +34,7 @@
 
 /* How to get the status of a job.  For Posix, this is just an
    int, but for other systems we have to crack the union wait. */
-#if !defined (_POSIX_VERSION)

+     sigset_t *oldset;
 {
   int old, new;

@@ -696,11 +698,11 @@
   switch (operation)
     {
