summaryrefslogtreecommitdiff
path: root/libc/src/stdio/linux
diff options
context:
space:
mode:
authorMichael Jones <michaelrj@google.com>2023-03-02 14:01:41 -0800
committerMichael Jones <michaelrj@google.com>2023-03-03 11:15:36 -0800
commit04a9c62554cf74b06bd1f7af94eefd5a0a19590d (patch)
tree31c072d5c6741bf98f423b734e8ee7b1190bd215 /libc/src/stdio/linux
parent56e8fd6f6a841d51b0dd52bfd646403e328fbe34 (diff)
[libc] move stdlib and stdio to new errno pattern
Fixes https://github.com/llvm/llvm-project/issues/61071 Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D145191
Diffstat (limited to 'libc/src/stdio/linux')
-rw-r--r--libc/src/stdio/linux/remove.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/stdio/linux/remove.cpp b/libc/src/stdio/linux/remove.cpp
index 2a868a78abf6..0199644b40a7 100644
--- a/libc/src/stdio/linux/remove.cpp
+++ b/libc/src/stdio/linux/remove.cpp
@@ -11,7 +11,7 @@
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
-#include <errno.h>
+#include "src/errno/libc_errno.h"
#include <fcntl.h> // For AT_* macros.
#include <sys/syscall.h> // For syscall numbers.
@@ -25,7 +25,7 @@ LLVM_LIBC_FUNCTION(int, remove, (const char *path)) {
ret = __llvm_libc::syscall_impl(SYS_unlinkat, AT_FDCWD, path, AT_REMOVEDIR);
if (ret >= 0)
return 0;
- errno = -ret;
+ libc_errno = -ret;
return -1;
}