fix(libSceNpTrophy2): include <cstddef> for std::size_t in the constants header #10641

Merged
maximilianfv merged 1 commit from upstream-pr/10641 into main 2026-10-27 23:03:51 +00:00
maximilianfv commented 2026-10-24 14:16:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by maximilianfv on 2026-10-24T14:16:37Z.


What

core/libs/prx/libSceNpTrophy2/include/NpTrophy2Constants.hpp declares NP_TROPHY2_ICON_SIZE_NONE as std::size_t but includes only <cstdint>. libstdc++ happens to declare std::size_t through that header; libc++ does not, so on macOS tests/GuestNpTrophy2.cpp (guest_nptrophy2_tests) fails to compile:

NpTrophy2Constants.hpp:36:23: error: no type named 'size_t' in namespace 'std'

This adds #include <cstddef>, the header that declares std::size_t. No behaviour changes on any host.

Tested

Apple M1 Pro, macOS 27.0.1, Apple clang (libc++), x86_64 build under Rosetta 2. main alone does not build on macOS, so I built in a tree made of mugurc's macOS series (ci/macos-series-2, 27e968974) merged with main at 522e32e3b6, plus other open macOS fixes, toggling only this change.

  • Without it, ninja -k 0 stops on the error above while compiling guest_nptrophy2_tests.
  • With it, the tree builds and ctest -R nptrophy2 passes (guest_nptrophy2).

Not tested on Linux or Windows; libstdc++ already provides std::size_t there, and the include is correct on every host.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code found the build error, made the change and wrote this description; I am responsible for every line)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4996152365 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10641). Originally posted by [maximilianfv](https://github.com/maximilianfv) on 2026-10-24T14:16:37Z. --- ### What `core/libs/prx/libSceNpTrophy2/include/NpTrophy2Constants.hpp` declares `NP_TROPHY2_ICON_SIZE_NONE` as `std::size_t` but includes only `<cstdint>`. libstdc++ happens to declare `std::size_t` through that header; libc++ does not, so on macOS `tests/GuestNpTrophy2.cpp` (`guest_nptrophy2_tests`) fails to compile: ``` NpTrophy2Constants.hpp:36:23: error: no type named 'size_t' in namespace 'std' ``` This adds `#include <cstddef>`, the header that declares `std::size_t`. No behaviour changes on any host. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Apple M1 Pro, macOS 27.0.1, Apple clang (libc++), x86_64 build under Rosetta 2. `main` alone does not build on macOS, so I built in a tree made of mugurc's macOS series (`ci/macos-series-2`, `27e968974`) merged with `main` at `522e32e3b6`, plus other open macOS fixes, toggling only this change. - Without it, `ninja -k 0` stops on the error above while compiling `guest_nptrophy2_tests`. - With it, the tree builds and `ctest -R nptrophy2` passes (`guest_nptrophy2`). Not tested on Linux or Windows; libstdc++ already provides `std::size_t` there, and the include is correct on every host. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes (Claude Code found the build error, made the change and wrote this description; I am responsible for every line) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-24 14:19:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T14:19:12Z.

Review: APPROVED


Reviewed exact head e21db2912e. The public header uses std::size_t but did not include its declaring header; adding <cstddef> directly fixes the libc++ portability issue without changing behavior. The change is isolated to that include. Hosted eligibility, conventions, intake, labels and progress-report checks pass; product build/test jobs were skipped, so I am relying on the author-reported libc++ build and focused trophy test rather than claiming an independent build. I found no blocking issue.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5638570674 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10641#pullrequestreview-5638570674). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T14:19:12Z. **Review:** APPROVED --- Reviewed exact head e21db2912e2dbb11aeb3666eab5b095403d2c917. The public header uses `std::size_t` but did not include its declaring header; adding `<cstddef>` directly fixes the libc++ portability issue without changing behavior. The change is isolated to that include. Hosted eligibility, conventions, intake, labels and progress-report checks pass; product build/test jobs were skipped, so I am relying on the author-reported libc++ build and focused trophy test rather than claiming an independent build. I found no blocking issue.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10641
No description provided.