diff --git a/libc/src/unistd.cpp b/libc/src/unistd.cpp index 75e8cedb..5c80ae87 100644 --- a/libc/src/unistd.cpp +++ b/libc/src/unistd.cpp @@ -473,7 +473,7 @@ extern "C" long rc = syscall(SYS_isatty, fd); if (rc < 0) { - errno = -rc; + errno = (int)-rc; return 0; } return rc;