fix(libSceLibcInternal): clamp the string count as size_t on macOS #17532
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17532"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Gonic0 on 2026-11-08T20:37:07Z.
What
libSceLibcInternaldoes not compile on macOS onmain:Clamppassescount(std::size_t) andsource->size - positiontostd::min.GuestLocale::String::sizeisstd::uint64_t, so the second argument isstd::uint64_t. On macOSstd::size_tisunsigned longandstd::uint64_tisunsigned long long, sostd::mincannot deduce one type. This names the type asstd::min<std::size_t>, as other files do.Both types are 64-bit unsigned on every target, so the value does not change. On Linux and Windows they are already the same type.
Tested
macOS 27.3, Apple M5 Pro, Apple clang, x86_64 Release under Rosetta 2. Tree:
main095ff72367with #16591 and #17425, which macOS still needs to buildlibs. Nothing underlibSceLibcInternalorGuestLocale.hppchanged between that commit andmain0bae53facd.ninja -k 0 libsfails onBasicString.cpp:45with the error above.libs(407 libraries, NID patching included) andrelinkerbuild.guest_libc_internal_basic_stringis registered only on Linux and MinGW. Enabled locally on macOS, it does not build, becauseGuestSceV2Exceptions.Suses ELF section directives. So it was not run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code