about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/speed.c1
-rw-r--r--sysdeps/unix/sysv/linux/tcsetattr.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/speed.c b/sysdeps/unix/sysv/linux/speed.c
index 5a23e53fc5..1244eb4c01 100644
--- a/sysdeps/unix/sysv/linux/speed.c
+++ b/sysdeps/unix/sysv/linux/speed.c
@@ -66,7 +66,6 @@ cfsetospeed  (termios_p, speed)
       return -1;
     }
 
-  termios_p->c_iflag &= ~IBAUD0;
   termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
   termios_p->c_cflag |= speed;
 
diff --git a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c
index 4a352372c9..b919dbe1c4 100644
--- a/sysdeps/unix/sysv/linux/tcsetattr.c
+++ b/sysdeps/unix/sysv/linux/tcsetattr.c
@@ -73,7 +73,9 @@ tcsetattr (fd, optional_actions, termios_p)
       return -1;
     }
 
-  k_termios.c_iflag = termios_p->c_iflag & ~IBAUD0;
+  termios_p->c_iflag &= ~IBAUD0;
+
+  k_termios.c_iflag = termios_p->c_iflag;
   k_termios.c_oflag = termios_p->c_oflag;
   k_termios.c_cflag = termios_p->c_cflag;
   k_termios.c_lflag = termios_p->c_lflag;