diff options
Diffstat (limited to 'cpukit/libcsupport/src/cfsetospeed.c')
-rw-r--r-- | cpukit/libcsupport/src/cfsetospeed.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/libcsupport/src/cfsetospeed.c b/cpukit/libcsupport/src/cfsetospeed.c index 36e3d997c8..41a232aa0f 100644 --- a/cpukit/libcsupport/src/cfsetospeed.c +++ b/cpukit/libcsupport/src/cfsetospeed.c @@ -25,8 +25,7 @@ #include <sys/stat.h> #include <errno.h> #include <termios.h> - -#include <rtems/libio_.h> +#include <rtems/termiostypes.h> #include <rtems/seterr.h> /** @@ -37,10 +36,10 @@ int cfsetospeed( speed_t speed ) { - if ( speed & ~CBAUD ) + if ( rtems_termios_baud_to_index( speed ) == -1 ) rtems_set_errno_and_return_minus_one( EINVAL ); - tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; + tp->c_ospeed = speed; return 0; } #endif |