about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/speed.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-09-09 06:44:48 +0000
committerRoland McGrath <roland@gnu.org>2003-09-09 06:44:48 +0000
commit416be7f049391ce421d9b12a2c3b81bb3cad9f58 (patch)
treec193750698736dca48e9907b58bb15056fb37097 /sysdeps/unix/sysv/linux/speed.c
parent2750c39c44ae8635983a86728ccd30f2d254a73b (diff)
downloadglibc-416be7f049391ce421d9b12a2c3b81bb3cad9f58.tar.gz
glibc-416be7f049391ce421d9b12a2c3b81bb3cad9f58.tar.xz
glibc-416be7f049391ce421d9b12a2c3b81bb3cad9f58.zip
2003-09-08 Roland McGrath <roland@frob.com>
	* sysdeps/unix/sysv/linux/speed.c
	(cfsetospeed): Only set c_ospeed under [_HAVE_STRUCT_TERMIOS_C_OSPEED].
	(cfsetispeed): Only set c_ispeed under [_HAVE_STRUCT_TERMIOS_C_ISPEED].
	* sysdeps/unix/sysv/linux/bits/termios.h
	(_HAVE_STRUCT_TERMIOS_C_ISPEED, _HAVE_STRUCT_TERMIOS_C_OSPEED): Define.
	* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/speed.c')
-rw-r--r--sysdeps/unix/sysv/linux/speed.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/speed.c b/sysdeps/unix/sysv/linux/speed.c
index 90104e5cc5..ba394cb05a 100644
--- a/sysdeps/unix/sysv/linux/speed.c
+++ b/sysdeps/unix/sysv/linux/speed.c
@@ -67,7 +67,9 @@ cfsetospeed  (termios_p, speed)
       return -1;
     }
 
+#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
   termios_p->c_ospeed = speed;
+#endif
   termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
   termios_p->c_cflag |= speed;
 
@@ -92,7 +94,9 @@ cfsetispeed (termios_p, speed)
       return -1;
     }
 
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
   termios_p->c_ispeed = speed;
+#endif
   if (speed == 0)
     termios_p->c_iflag |= IBAUD0;
   else