fix(libSceLibcInternal): build TimeGetFields with Apple clang #22056
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22056"
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 kurexw on 2026-11-17T03:31:09Z.
What
#21895 added
core/libs/prx/libSceLibcInternal/TimeGetFields.cpp. Apple clang refuses to compile it, so every macOS build ofmainstops there. Three calls convert aconst void*vtable slot (caseMethods/classificationMethods, declaredconst void*inGuestLocale.hpp) straight to a function pointer:This PR drops the qualifier first, with
reinterpret_cast<Fn>(const_cast<void*>(slot)), as the repository already does for other const slots (StandardExceptions.cpp,InspectorFrontendRouter.cpp). The same function is called with the same arguments, so behaviour doesn't change.Tested
macOS 27.2 on an Apple M4, with Apple clang for an x86-64 build under Rosetta.
mainatb412486d3e,TimeGetFields.cpp.ofails with the three errors above.ninja guest_libc_internal_time_get_fields_testsbuilds with no errors. The object adds no warnings.ctest -R '^guest_libc_internal_time_get_fields$'passed in three runs out of three.const_castbefore the existing cast, and those compilers already accepted the original line.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