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;
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;
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;