summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/cfsetspeed.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/cfsetspeed.c')
-rw-r--r--cpukit/libcsupport/src/cfsetspeed.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/cfsetspeed.c b/cpukit/libcsupport/src/cfsetspeed.c
index 293ff6e3ef..0d37840319 100644
--- a/cpukit/libcsupport/src/cfsetspeed.c
+++ b/cpukit/libcsupport/src/cfsetspeed.c
@@ -24,6 +24,7 @@
#include <sys/stat.h>
#include <errno.h>
#include <termios.h>
+#include <rtems/termiostypes.h>
#include <rtems/seterr.h>
int cfsetspeed(
@@ -31,7 +32,7 @@ int cfsetspeed(
speed_t speed
)
{
- if ( speed & ~CBAUD )
+ if ( rtems_termios_baud_to_index( speed ) == -1 )
rtems_set_errno_and_return_minus_one( EINVAL );
cfsetispeed( tp, speed );