Rich Felker | 126f58b | 2016-07-03 15:01:04 -0400 | [diff] [blame] | 1 | #define _BSD_SOURCE |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 2 | #include <termios.h> |
3 | #include <sys/ioctl.h> | ||||
4 | |||||
5 | speed_t cfgetospeed(const struct termios *tio) | ||||
6 | { | ||||
7 | return tio->c_cflag & CBAUD; | ||||
8 | } | ||||
9 | |||||
10 | speed_t cfgetispeed(const struct termios *tio) | ||||
11 | { | ||||
12 | return cfgetospeed(tio); | ||||
13 | } |