From a51fb6a428655efa2a6fbb508918af27e5095b5c Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 11 Jul 2023 12:45:08 +0200 Subject: [PATCH] libc: Fix conversion error in isatty() --- libc/src/unistd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;