From 38daa6d4ef1f3386cc50198199c5ec61dcb012af Mon Sep 17 00:00:00 2001 From: Uzair Nawaz Date: Mon, 16 Jun 2025 21:28:51 +0000 Subject: [PATCH] [libc] build fix: always use our char8_t headers even in overlay mode (#144433) Build fix caused by certain platforms not providing char8_t when expected Temporary fix to just always use our own definition, even in overlay mode. --- libc/hdr/types/char8_t.h | 8 -------- libc/src/__support/wchar/character_converter.cpp | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/libc/hdr/types/char8_t.h b/libc/hdr/types/char8_t.h index 31de764658f9..4d71e3dd8909 100644 --- a/libc/hdr/types/char8_t.h +++ b/libc/hdr/types/char8_t.h @@ -9,14 +9,6 @@ #ifndef LLVM_LIBC_HDR_TYPES_CHAR8_T_H #define LLVM_LIBC_HDR_TYPES_CHAR8_T_H -#ifdef LIBC_FULL_BUILD - #include "include/llvm-libc-types/char8_t.h" -#else // overlay mode - -#include "hdr/uchar_overlay.h" - -#endif // LLVM_LIBC_FULL_BUILD - #endif // LLVM_LIBC_HDR_TYPES_CHAR8_T_H diff --git a/libc/src/__support/wchar/character_converter.cpp b/libc/src/__support/wchar/character_converter.cpp index bac2f6d827e1..ca709769616c 100644 --- a/libc/src/__support/wchar/character_converter.cpp +++ b/libc/src/__support/wchar/character_converter.cpp @@ -70,7 +70,7 @@ ErrorOr CharacterConverter::pop_utf8() { char32_t output; // Shift to get the next 6 bits from the utf32 encoding - const char32_t shift_amount = + const size_t shift_amount = (state->total_bytes - state->bytes_processed - 1) * ENCODED_BITS_PER_UTF8; if (state->bytes_processed == 0) { /*