mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-19 01:09:39 +00:00
[libc] Switch termios implementations to libc_errno.
This commit is contained in:
parent
76df706bca
commit
bb03705726
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user