diff options
| author | Michael Jones <michaelrj@google.com> | 2023-03-02 14:01:41 -0800 |
|---|---|---|
| committer | Michael Jones <michaelrj@google.com> | 2023-03-03 11:15:36 -0800 |
| commit | 04a9c62554cf74b06bd1f7af94eefd5a0a19590d (patch) | |
| tree | 31c072d5c6741bf98f423b734e8ee7b1190bd215 /libc/src/stdlib/strtol.cpp | |
| parent | 56e8fd6f6a841d51b0dd52bfd646403e328fbe34 (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/stdlib/strtol.cpp')
| -rw-r--r-- | libc/src/stdlib/strtol.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/src/stdlib/strtol.cpp b/libc/src/stdlib/strtol.cpp index 9564f5d3803b..fb02353d0938 100644 --- a/libc/src/stdlib/strtol.cpp +++ b/libc/src/stdlib/strtol.cpp @@ -9,6 +9,7 @@ #include "src/stdlib/strtol.h" #include "src/__support/common.h" #include "src/__support/str_to_integer.h" +#include "src/errno/libc_errno.h" namespace __llvm_libc { @@ -17,7 +18,7 @@ LLVM_LIBC_FUNCTION(long, strtol, int base)) { auto result = internal::strtointeger<long>(str, base); if (result.has_error()) - errno = result.error; + libc_errno = result.error; if (str_end != nullptr) *str_end = const_cast<char *>(str + result.parsed_len); |
