mirror of
https://github.com/fluencelabs/musl
synced 2025-06-01 00:51:41 +00:00
14 lines
243 B
C
14 lines
243 B
C
|
#include <termios.h>
|
||
|
#include <sys/ioctl.h>
|
||
|
#include <string.h>
|
||
|
#include <errno.h>
|
||
|
|
||
|
int tcsetattr(int fd, int act, const struct termios *tio)
|
||
|
{
|
||
|
if (act < 0 || act > 2) {
|
||
|
errno = EINVAL;
|
||
|
return -1;
|
||
|
}
|
||
|
return ioctl(fd, TCSETS+act, tio);
|
||
|
}
|