diff options
Diffstat (limited to 'libc-top-half/musl/src/termios/cfgetospeed.c')
-rw-r--r-- | libc-top-half/musl/src/termios/cfgetospeed.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/termios/cfgetospeed.c b/libc-top-half/musl/src/termios/cfgetospeed.c new file mode 100644 index 0000000..55fa6f5 --- /dev/null +++ b/libc-top-half/musl/src/termios/cfgetospeed.c @@ -0,0 +1,13 @@ +#define _BSD_SOURCE +#include <termios.h> +#include <sys/ioctl.h> + +speed_t cfgetospeed(const struct termios *tio) +{ + return tio->c_cflag & CBAUD; +} + +speed_t cfgetispeed(const struct termios *tio) +{ + return cfgetospeed(tio); +} |