diff options
Diffstat (limited to 'libc-top-half/musl/src/termios/tcsetattr.c')
-rw-r--r-- | libc-top-half/musl/src/termios/tcsetattr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/termios/tcsetattr.c b/libc-top-half/musl/src/termios/tcsetattr.c new file mode 100644 index 0000000..94df18f --- /dev/null +++ b/libc-top-half/musl/src/termios/tcsetattr.c @@ -0,0 +1,12 @@ +#include <termios.h> +#include <sys/ioctl.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); +} |