replace __wake function with macro that performs direct syscall
[musl] / src / termios / cfsetospeed.c
1 #include <termios.h>
2 #include <sys/ioctl.h>
3 #include <errno.h>
4 #include "libc.h"
5
6 int cfsetospeed(struct termios *tio, speed_t speed)
7 {
8         if (speed & ~CBAUD) {
9                 errno = EINVAL;
10                 return -1;
11         }
12         tio->c_cflag &= ~CBAUD;
13         tio->c_cflag |= speed;
14         return 0;
15 }
16
17 int cfsetispeed(struct termios *tio, speed_t speed)
18 {
19         return speed ? cfsetospeed(tio, speed) : 0;
20 }
21
22 weak_alias(cfsetospeed, cfsetspeed);