[libc] Switch termios implementations to libc_errno.

This commit is contained in:
Siva Chandra Reddy 2023-03-14 01:00:23 +00:00
parent 76df706bca
commit bb03705726
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ namespace __llvm_libc {
LLVM_LIBC_FUNCTION(int, tcdrain, (int fd)) {
long ret = __llvm_libc::syscall_impl(SYS_ioctl, fd, TCSBRK, 1);
if (ret < 0) {
errno = -ret;
libc_errno = -ret;
return -1;
}
return 0;

View File

@ -21,7 +21,7 @@ namespace __llvm_libc {
LLVM_LIBC_FUNCTION(int, tcflush, (int fd, int queue_selector)) {
long ret = __llvm_libc::syscall_impl(SYS_ioctl, fd, TCFLSH, queue_selector);
if (ret < 0) {
errno = -ret;
libc_errno = -ret;
return -1;
}
return 0;

View File

@ -22,7 +22,7 @@ LLVM_LIBC_FUNCTION(pid_t, tcgetsid, (int fd)) {
pid_t sid;
long ret = __llvm_libc::syscall_impl(SYS_ioctl, fd, TIOCGSID, &sid);
if (ret < 0) {
errno = -ret;
libc_errno = -ret;
return -1;
}
return sid;